summaryrefslogtreecommitdiff
path: root/libre/systemd/udev-hook
diff options
context:
space:
mode:
Diffstat (limited to 'libre/systemd/udev-hook')
-rw-r--r--libre/systemd/udev-hook8
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