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

Submitted by Hongxu Jia on July 12, 2013, 9:29 a.m. | Patch ID: 53557


Message ID 158a039e2de8e6e5053891aa64c6e864cae0b34b.1373599041.git.hongxu.jia@windriver.com
State New
Headers show

Commit Message

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 hide | download patch | download mbox

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.