mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 12:57:14 +08:00
36 lines
672 B
Bash
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
|
|
} |