mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 17:57:13 +08:00
22 lines
833 B
Plaintext
22 lines
833 B
Plaintext
## arg 1: the new package version
|
|
post_install() {
|
|
cat << EOF
|
|
-- NOTICE --------------------------------------------------------------------------
|
|
All unit files have been installed to /lib/systemd/system. This only allows systemd
|
|
to be aware of them. It will not register them for automatic activation on boot. Use
|
|
'systemctl enable <unit>' to ensure that a unit is started at boot.
|
|
------------------------------------------------------------------------------------
|
|
EOF
|
|
|
|
# this might be installed at the same time as systemd which means that it's
|
|
# not running yet. the daemon-reload call will fail with a bogus error.
|
|
post_upgrade 2>/dev/null
|
|
}
|
|
|
|
post_upgrade() {
|
|
# reread all known unit files
|
|
ps hp 1 o comm | {
|
|
read argv0 _
|
|
[ "$argv0" = "systemd" ] && systemctl daemon-reload || :
|
|
} || :
|
|
} >/dev/null 2>&1 |