From f5deb41aaa263d7dbf2e5dbe631b64362c1a594a Mon Sep 17 00:00:00 2001 From: bill-auger Date: Fri, 3 Jan 2020 11:55:41 -0500 Subject: [notsystemd][notsystemd-common][notsystemd-udev]: move to [nonsystemd] --- nonsystemd/notsystemd/systemd-hook | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 nonsystemd/notsystemd/systemd-hook (limited to 'nonsystemd/notsystemd/systemd-hook') diff --git a/nonsystemd/notsystemd/systemd-hook b/nonsystemd/notsystemd/systemd-hook new file mode 100644 index 000000000..793a42943 --- /dev/null +++ b/nonsystemd/notsystemd/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