From b1287b34794130a1ff32f61a1ba30b9a830466c1 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Tue, 15 Jan 2019 23:38:03 -0500 Subject: copy systemd to [libre-testing] --- libre-testing/systemd/systemd-hook | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 libre-testing/systemd/systemd-hook (limited to 'libre-testing/systemd/systemd-hook') diff --git a/libre-testing/systemd/systemd-hook b/libre-testing/systemd/systemd-hook new file mode 100644 index 000000000..793a42943 --- /dev/null +++ b/libre-testing/systemd/systemd-hook @@ -0,0 +1,23 @@ +#!/bin/sh -e + +systemd_live() { + if [ ! -d /run/systemd/system ]; then + echo >&2 " Skipped: Current root is not booted." + exit 0 + fi +} + +case $1 in + catalog) /usr/bin/journalctl --update-catalog ;; + update) touch -c /usr ;; + sysusers) /usr/bin/systemd-sysusers ;; + tmpfiles) /usr/bin/systemd-tmpfiles --create ;; + + daemon-reload) systemd_live; /usr/bin/systemctl daemon-reload ;; + binfmt) systemd_live; /usr/lib/systemd/systemd-binfmt ;; + sysctl) systemd_live; /usr/lib/systemd/systemd-sysctl ;; + + *) echo >&2 " Invalid operation '$1'"; exit 1 ;; +esac + +exit 0 -- cgit v1.2.3