aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-23 13:33:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-23 13:33:50 +0200
commit6b3c6b23a16869012c934c0df6244885b22e0aa1 (patch)
tree58be5e103f6b9efbad824628b7b8e0ed09fdabe5
parentb8f3927e48467ecf196e91a95dd29c4f409709d8 (diff)
Add udev startup
-rwxr-xr-xinit19
1 files changed, 18 insertions, 1 deletions
diff --git a/init b/init
index fdcb318..0caf718 100755
--- a/init
+++ b/init
@@ -36,8 +36,25 @@ mount -t tmpfs -o "noexec,nosuid,size=10%,mode=0755" tmpfs /run
mkdir -p /tmp
mount -t tmpfs -o "nodev,nosuid,size=10%,mode=1777" tmpfs /tmp
-cmdline="$(cat /proc/cmdline)"
+# Start udev.
+#
+# Based on Debian initrd's init-top/udev. Note that we don't stop it at
+# at the end of init.
+#
+info "starting udev..."
+
+if [ -w /sys/kernel/uevent_helper ]; then
+ echo >/sys/kernel/uevent_helper
+fi
+SYSTEMD_LOG_LEVEL=info /lib/systemd/systemd-udevd --daemon --resolve-names=never
+
+udevadm trigger --action=add
+udevadm settle || true
+
+# Parse command line.
+#
+cmdline="$(cat /proc/cmdline)"
info "boot cmdline: $cmdline"
sleep 2