summarylogtreecommitdiffstats
path: root/systemd-hook
diff options
context:
space:
mode:
authorNicolas Iooss2021-05-26 09:38:53 +0200
committerNicolas Iooss2021-05-26 09:38:53 +0200
commitbe49cb812eaef5840f8fbc88e2ee3086d6dd630a (patch)
tree1803eaeb578dee7dac385cb79d6e0f0d1336e5d5 /systemd-hook
parent2bba546e9901bd1648cac6c65cecc9a5aac58a8c (diff)
downloadaur-be49cb812eaef5840f8fbc88e2ee3086d6dd630a.tar.gz
systemd-selinux 248.3-2 update
Diffstat (limited to 'systemd-hook')
-rw-r--r--systemd-hook9
1 files changed, 9 insertions, 0 deletions
diff --git a/systemd-hook b/systemd-hook
index 6f2e899234cf..0a4754b21647 100644
--- a/systemd-hook
+++ b/systemd-hook
@@ -1,6 +1,14 @@
#!/bin/sh -e
+is_chrooted() {
+ if systemd-detect-virt --chroot; then
+ echo >&2 " Skipped: Running in chroot."
+ exit 0
+ fi
+}
+
systemd_live() {
+ is_chrooted
if [ ! -d /run/systemd/system ]; then
echo >&2 " Skipped: Current root is not booted."
exit 0
@@ -8,6 +16,7 @@ systemd_live() {
}
udevd_live() {
+ is_chrooted
if [ ! -d /run/udev ]; then
echo >&2 " Skipped: Device manager is not running."
exit 0