diff options
Diffstat (limited to 'community-testing/systemd/systemd.install')
-rw-r--r-- | community-testing/systemd/systemd.install | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/community-testing/systemd/systemd.install b/community-testing/systemd/systemd.install new file mode 100644 index 000000000..b4228255d --- /dev/null +++ b/community-testing/systemd/systemd.install @@ -0,0 +1,31 @@ +#!/bin/sh + +checkgroups() { + getent group lock >/dev/null || groupadd -g 54 lock +} + +post_install() { + checkgroups + + [ -f etc/machine-id ] || 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." +} + +post_upgrade() { + checkgroups + + [ -f etc/machine-id ] || systemd-machine-id-setup + systemctl daemon-reexec >/dev/null || : +} + +pre_remove() { + rm -f /etc/systemd/system/default.target +} + +post_remove() { + getent group lock >/dev/null && groupdel lock +} + +# vim:set ts=2 sw=2 et: |