Patchwork [08/10] udev: ensure /dev/pts and /dev/shm does exists

login
register
mail settings
Submitter Otavio Salvador
Date Jan. 5, 2012, 7:37 p.m.
Message ID <34562928a48ff23e9ab8b0262cdb136ee807044c.1325792209.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/18495/
State Accepted
Commit 88da06039541e6aee390fbf42f87d7e2650e4479
Headers show

Comments

Otavio Salvador - Jan. 5, 2012, 7:37 p.m.
---
 meta/recipes-core/udev/udev/init |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index bfbac0d..6a4464c 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -30,9 +30,10 @@  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"
-	mkdir -m 0755 /dev/pts
-	mkdir -m 1777 /dev/shm
 }
+[ -e /dev/pts ] || mkdir -m 0755 /dev/pts
+[ -e /dev/shm ] || mkdir -m 1777 /dev/shm
+
 
 if [ -e /etc/dev.tar ]; then
 	(cd /; tar xf /etc/dev.tar 2>&1 | grep -v 'time stamp' || true)