diff options
author | Nicolas Iooss | 2021-05-26 09:38:53 +0200 |
---|---|---|
committer | Nicolas Iooss | 2021-05-26 09:38:53 +0200 |
commit | be49cb812eaef5840f8fbc88e2ee3086d6dd630a (patch) | |
tree | 1803eaeb578dee7dac385cb79d6e0f0d1336e5d5 /systemd-hook | |
parent | 2bba546e9901bd1648cac6c65cecc9a5aac58a8c (diff) | |
download | aur-be49cb812eaef5840f8fbc88e2ee3086d6dd630a.tar.gz |
systemd-selinux 248.3-2 update
Diffstat (limited to 'systemd-hook')
-rw-r--r-- | systemd-hook | 9 |
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 |