Patchwork [4/6] udev: fix invoking pmount failed based on sysvinit

login
register
mail settings
Submitter Hongxu Jia
Date July 12, 2013, 9:29 a.m.
Message ID <158a039e2de8e6e5053891aa64c6e864cae0b34b.1373599041.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/53557/
State New
Headers show

Comments

Hongxu Jia - July 12, 2013, 9:29 a.m.
The pmount is invoked in the udev's mount.sh script, and it needs the
existence of `/var/lock', `/var/lock' is symlinked to `/run/lock'.

When the system is based on sysvinit, `/run/lock' is created by populate-
volatile.sh, if the udev service starts before populate-volatile.sh starts,
`/var/lock' will be a invalid link.

Create `/run/lock' directory at udev startup to avoid this invalid link problem.

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

Patch

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index d90d446..8e9f3f8 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -53,6 +53,7 @@  case "$1" in
     [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
     mount -a -t tmpfs 2>/dev/null
     mkdir -p /var/volatile/tmp
+    mkdir -p /run/lock
 
     # Cache handling.
     # A list of files which are used as a criteria to judge whether the udev cache could be reused.