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

mail settings
Submitter Hongxu Jia
Date July 12, 2013, 9:29 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/53557/
State New
Headers show


Hongxu Jia - July 12, 2013, 9:29 a.m.
The pmount is invoked in the udev's 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-, if the udev service starts before 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 <>
 meta/recipes-core/udev/udev/init | 1 +
 1 file changed, 1 insertion(+)


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.