core/initscripts-systemd/initscripts-systemd.install

36 lines
672 B
Bash

#!/bin/bash
. /etc/rc.conf
units=('chakra-modules-load.service'
'chakra-daemons.target'
'rc-local.service')
post_install() {
systemctl enable "${units[@]}"
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
}
post_upgrade() {
if [ -e sys/fs/cgroup/systemd ]; then
kill -1 1
fi
}
pre_remove() {
if [ -e sys/fs/cgroup/systemd ]; then
systemctl disable "${units[@]}"
fi
}
post_remove() {
rm -f /etc/{modprobe,modules-load}.d/rc.conf
if [ -e sys/fs/cgroup/systemd ]; then
kill -1 1
fi
}