2011-06-17 20:40:10 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
. /etc/rc.conf
|
|
|
|
|
2012-06-11 11:26:52 +08:00
|
|
|
units=('chakra-modules-load.service'
|
2011-06-17 20:40:10 +08:00
|
|
|
'chakra-daemons.target'
|
|
|
|
'rc-local.service')
|
|
|
|
|
|
|
|
post_install() {
|
2012-06-11 11:26:52 +08:00
|
|
|
systemctl enable "${units[@]}"
|
2011-06-17 20:40:10 +08:00
|
|
|
|
|
|
|
post_upgrade
|
|
|
|
|
|
|
|
# we do this here explicitly so that there isn't a lagtime of an extra reboot
|
|
|
|
# before the gluework to /etc/rc.conf goes into effect
|
2012-06-11 11:26:52 +08:00
|
|
|
/usr/lib/systemd/chakra-modules-load
|
2011-06-17 20:40:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
post_upgrade() {
|
2012-06-11 11:26:52 +08:00
|
|
|
if [ -e sys/fs/cgroup/systemd ]; then
|
|
|
|
kill -1 1
|
2011-06-17 20:40:10 +08:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
pre_remove() {
|
2012-06-11 11:26:52 +08:00
|
|
|
if [ -e sys/fs/cgroup/systemd ]; then
|
|
|
|
systemctl disable "${units[@]}"
|
2011-06-17 20:40:10 +08:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
post_remove() {
|
|
|
|
rm -f /etc/{modprobe,modules-load}.d/rc.conf
|
2012-06-11 11:26:52 +08:00
|
|
|
if [ -e sys/fs/cgroup/systemd ]; then
|
|
|
|
kill -1 1
|
|
|
|
fi
|
2011-06-17 20:40:10 +08:00
|
|
|
}
|