summaryrefslogtreecommitdiffstats
path: root/debian/extra/initramfs-tools/scripts/init-top/udev
diff options
context:
space:
mode:
Diffstat (limited to 'debian/extra/initramfs-tools/scripts/init-top/udev')
-rwxr-xr-xdebian/extra/initramfs-tools/scripts/init-top/udev31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/extra/initramfs-tools/scripts/init-top/udev b/debian/extra/initramfs-tools/scripts/init-top/udev
new file mode 100755
index 0000000..9bdfe86
--- /dev/null
+++ b/debian/extra/initramfs-tools/scripts/init-top/udev
@@ -0,0 +1,31 @@
+#!/bin/sh -e
+
+PREREQS=""
+
+prereqs() { echo "$PREREQS"; }
+
+case "$1" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+if [ -w /sys/kernel/uevent_helper ]; then
+ echo > /sys/kernel/uevent_helper
+fi
+
+if [ "${quiet:-n}" = "y" ]; then
+ log_level=notice
+else
+ log_level=info
+fi
+
+SYSTEMD_LOG_LEVEL=$log_level /lib/systemd/systemd-udevd --daemon --resolve-names=never
+
+udevadm trigger --type=subsystems --action=add
+udevadm trigger --type=devices --action=add
+udevadm settle || true
+
+# Leave udev running to process events that come in out-of-band (like USB
+# connections)