core/initscripts-systemd/initscripts-systemd.install

36 lines
672 B
Plaintext
Raw Normal View History

2011-06-17 20:40:10 +08:00
#!/bin/bash
. /etc/rc.conf
units=('chakra-modules-load.service'
2011-06-17 20:40:10 +08:00
'chakra-daemons.target'
'rc-local.service')
post_install() {
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
/usr/lib/systemd/chakra-modules-load
2011-06-17 20:40:10 +08:00
}
post_upgrade() {
if [ -e sys/fs/cgroup/systemd ]; then
kill -1 1
2011-06-17 20:40:10 +08:00
fi
}
pre_remove() {
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
if [ -e sys/fs/cgroup/systemd ]; then
kill -1 1
fi
2011-06-17 20:40:10 +08:00
}