From 354f539407e336532a429aead7d2249b26611653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Wed, 30 May 2012 17:43:28 -0300 Subject: Adding systemd as a subtree merge from another branch This is under testing! --- libre/systemd | 1 - 1 file changed, 1 deletion(-) delete mode 160000 libre/systemd (limited to 'libre/systemd/systemd.install') diff --git a/libre/systemd b/libre/systemd deleted file mode 160000 index dd743ddf0..000000000 --- a/libre/systemd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dd743ddf0d2297079591f90dc75938de160ac554 -- cgit v1.2.3-2-g168b From 8530dec3776239e8e5c2b2d065861083011f46cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Wed, 30 May 2012 21:06:44 -0300 Subject: systemd-44-7: added rePKGBUILD --- libre/systemd/systemd.install | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 libre/systemd/systemd.install (limited to 'libre/systemd/systemd.install') diff --git a/libre/systemd/systemd.install b/libre/systemd/systemd.install new file mode 100644 index 000000000..0c3e9abee --- /dev/null +++ b/libre/systemd/systemd.install @@ -0,0 +1,50 @@ +#!/bin/sh + +checkgroups() { + if ! getent group lock >/dev/null; then + groupadd -g 54 lock + fi +} + +sd_booted() { + [ -e sys/fs/cgroup/systemd ] +} + +post_install() { + checkgroups + + if [ ! -f etc/machine-id ]; then + systemd-machine-id-setup + fi + + 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 + + if [ ! -f etc/machine-id ]; then + systemd-machine-id-setup + fi + + if sd_booted; then + # we moved the binary in 44-2 to /usr, so a reexec leads to a + # coredump. refuse this reexec and warn the user that they should + # reboot instead. + if [ "$(vercmp 44-2 "$2")" -eq 1 ]; then + echo "warning: refusing to reexec systemd. the system should be rebooted." + else + systemctl daemon-reload + systemctl daemon-reexec + fi + fi +} + +post_remove() { + if getent group lock >/dev/null; then + groupdel lock + fi +} + +# vim:set ts=2 sw=2 et: -- cgit v1.2.3-2-g168b