[1/1] udev: create /var/volatile/tmp to avoid dead link

Submitted by Qi.Chen@windriver.com on April 23, 2013, 4:31 a.m. | Patch ID: 48665


Message ID 454e42299f8d61a1c681a48e27e828c2a8572aa1.1366687285.git.Qi.Chen@windriver.com
State Accepted
Commit 2f93c8466ca146c965585ea38210ddb5fb5754bd
Headers show

Commit Message

Qi.Chen@windriver.com April 23, 2013, 4:31 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

If it's not first boot, /tmp has already been symlinked to /var/volatile/tmp.
But the udev service starts before populate-volatile.sh starts. This leads to
a dead link at /tmp. As a result, trying to create any file under /tmp will

If a USB is plugged in before the populate-volatile.sh script starts, the
/tmp/.automount-$name file will not be created correctly. As a result, when
the USB is unplugged, the /media/$name directory is not removed.

So we create /var/volatile/tmp directory in the udev script to avoid this dead
link problem.

[YOCTO #3404]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 meta/recipes-core/udev/udev/init |    1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index 1f871da..cd87f50 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -51,6 +51,7 @@  case "$1" in
     [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
     mount -a -t tmpfs 2>/dev/null
     mkdir -p /var/volatile/run
+    mkdir -p /var/volatile/tmp
     # cache handling
     if [ "$DEVCACHE" != "" ]; then