]> code.ossystems Code Review - openembedded-core.git/commitdiff
udev: Update initscript to check for devtmpfs
authorSaul Wold <sgw@linux.intel.com>
Sat, 13 Apr 2013 06:51:16 +0000 (23:51 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 13 Apr 2013 22:44:08 +0000 (23:44 +0100)
This is needed because the udev_182 now requires devtmpfs and will not work correctly
with out, so ensure that the kernel contains devtmpfs by checking /proc/filesystems.

[YOCTO #4125]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/udev/udev/init

index 37b52312e2417f4a251e99fd6e32796831a9e8b8..2a95ab747d557042d5dd6733141af872fa4a4289 100644 (file)
@@ -35,6 +35,14 @@ case "$1" in
     # propagate /dev from /sys
     echo "Starting udev"
 
+    # Check for requireed devtmpfs before trying to start udev and
+    # mount a no-existant fs.
+    if ! grep -q devtmpfs /proc/filesystems
+    then
+        echo "Missing devtmpfs, which is required for udev to run";
+        echo "Halting..."
+        halt
+    fi
     # mount the tmpfs on /dev, if not already done
     LANG=C awk '$2 == "/dev" && ($3 == "tmpfs" || $3 == "devtmpfs") { exit 1 }' /proc/mounts && {
             mount -n -o mode=0755 -t tmpfs none "/dev"