mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-06 05:37:13 +08:00
30 lines
699 B
Bash
30 lines
699 B
Bash
#!/bin/bash
|
|
|
|
checkgroups() {
|
|
getent group lock >/dev/null || groupadd -g 54 lock
|
|
}
|
|
|
|
post_install() {
|
|
checkgroups
|
|
|
|
[ -f /etc/machine-id ] || /bin/systemd-machine-id-setup
|
|
|
|
echo "systemd has been installed to /bin/systemd. Please ensure you append"
|
|
echo "init=/bin/systemd to your kernel command line in your bootloader."
|
|
echo "Please disable and blacklist syslog-ng. Use rsyslog, which work correct with systemd."
|
|
}
|
|
|
|
post_upgrade() {
|
|
checkgroups
|
|
|
|
[ -f /etc/machine-id ] || /bin/systemd-machine-id-setup
|
|
/bin/systemctl daemon-reexec >/dev/null || :
|
|
}
|
|
|
|
pre_remove() {
|
|
/bin/rm -f /etc/systemd/system/default.target
|
|
}
|
|
|
|
post_remove() {
|
|
getent group lock >/dev/null && groupdel lock
|
|
} |