summarylogtreecommitdiffstats
path: root/systemd-hook
diff options
context:
space:
mode:
authorYurii Kolesnykov2019-09-12 10:34:06 +0300
committerYurii Kolesnykov2019-09-12 10:34:06 +0300
commit0d2eaa5679e5fc97b191808277bf584fe6cae522 (patch)
tree10a748858af7d77770389185db01d318d3b0aaaa /systemd-hook
parent396c806a06050e0aee02acb86b263b9a7fbd021c (diff)
downloadaur-0d2eaa5679e5fc97b191808277bf584fe6cae522.tar.gz
243.r25.g7d79cc96ea
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Diffstat (limited to 'systemd-hook')
-rw-r--r--systemd-hook9
1 files changed, 7 insertions, 2 deletions
diff --git a/systemd-hook b/systemd-hook
index 0a664f2c582..6f2e899234c 100644
--- a/systemd-hook
+++ b/systemd-hook
@@ -14,7 +14,9 @@ udevd_live() {
fi
}
-case $1 in
+op="$1"; shift
+
+case "$op" in
catalog) /usr/bin/journalctl --update-catalog ;;
hwdb) /usr/bin/systemd-hwdb --usr update ;;
update) touch -c /usr ;;
@@ -26,7 +28,10 @@ case $1 in
binfmt) systemd_live; /usr/lib/systemd/systemd-binfmt ;;
sysctl) systemd_live; /usr/lib/systemd/systemd-sysctl ;;
- *) echo >&2 " Invalid operation '$1'"; exit 1 ;;
+ # For use by other packages
+ reload) systemd_live; /usr/bin/systemctl try-reload-or-restart "$@" ;;
+
+ *) echo >&2 " Invalid operation '$op'"; exit 1 ;;
esac
exit 0