diff options
Diffstat (limited to 'libre/systemd/udev-hook')
-rw-r--r-- | libre/systemd/udev-hook | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libre/systemd/udev-hook b/libre/systemd/udev-hook index 61d853293..659463af7 100644 --- a/libre/systemd/udev-hook +++ b/libre/systemd/udev-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 +} + udevd_live() { + is_chrooted if [ ! -d /run/udev ]; then echo >&2 " Skipped: Device manager is not running." exit 0 |