udev: Ensure tmpfs are mounted and volatile/run exists
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Oct 2012 15:16:17 +0000 (15:16 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 30 Oct 2012 11:06:38 +0000 (11:06 +0000)
There is a race with udev where eiher the run directory can get replaced
during bootup leading to ude errors, or if the tmpfs was mounted and
populate-volatiles hasn't run, udev won't start at all.

This ensures that any tmpfs get mounted before udev starts and that the
default volatiles/run directory at least exists, fixing the races
and boot time errors caused after the recent udev upgrade.

(From OE-Core rev: fbec192f6bc41a335ede85843ba22a89d13501ab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/udev/udev/init
meta/recipes-core/udev/udev_182.bb

index ca02abb..74449fe 100644 (file)
@@ -37,9 +37,8 @@ export ACTION=add
 echo "Starting udev"
 
 # 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"
-}
+mount -a -t tmpfs
+mkdir -p /var/volatile/run
 [ -e /dev/pts ] || mkdir -m 0755 /dev/pts
 [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
 
index 8e4a391..c41de9f 100644 (file)
@@ -1,6 +1,6 @@
 include udev.inc
 
-PR = "r1"
+PR = "r2"
 
 # module-init-tools from kmod_git will provide libkmod runtime
 DEPENDS += "module-init-tools"