diff options
author | Bruno Cichon <ebrasca@librepanther.com> | 2018-10-01 01:51:03 +0200 |
---|---|---|
committer | Bruno Cichon <ebrasca@librepanther.com> | 2018-10-01 01:51:03 +0200 |
commit | 56f955aca6231693fe797de4793f77ed58ab116e (patch) | |
tree | 17daeabce98174f288bab94b47961dc9e9931e66 /libre-testing/systemd/systemd-hook | |
parent | 75ff40baa049bae7e9270d20ef86a88b733006ab (diff) | |
download | abslibre-56f955aca6231693fe797de4793f77ed58ab116e.tar.gz abslibre-56f955aca6231693fe797de4793f77ed58ab116e.tar.bz2 abslibre-56f955aca6231693fe797de4793f77ed58ab116e.zip |
Add some base packages for ppc64le
Diffstat (limited to 'libre-testing/systemd/systemd-hook')
-rw-r--r-- | libre-testing/systemd/systemd-hook | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libre-testing/systemd/systemd-hook b/libre-testing/systemd/systemd-hook new file mode 100644 index 000000000..0a664f2c5 --- /dev/null +++ b/libre-testing/systemd/systemd-hook @@ -0,0 +1,32 @@ +#!/bin/sh -e + +systemd_live() { + if [ ! -d /run/systemd/system ]; then + echo >&2 " Skipped: Current root is not booted." + exit 0 + fi +} + +udevd_live() { + if [ ! -d /run/udev ]; then + echo >&2 " Skipped: Device manager is not running." + exit 0 + fi +} + +case $1 in + catalog) /usr/bin/journalctl --update-catalog ;; + hwdb) /usr/bin/systemd-hwdb --usr update ;; + update) touch -c /usr ;; + sysusers) /usr/bin/systemd-sysusers ;; + tmpfiles) /usr/bin/systemd-tmpfiles --create ;; + + daemon-reload) systemd_live; /usr/bin/systemctl daemon-reload ;; + udev-reload) udevd_live; /usr/bin/udevadm control --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 |