Patchwork [2/2] initramfs: Make mkdir not fail

login
register
mail settings
Submitter Ross Burton
Date Sept. 27, 2012, 2:20 p.m.
Message ID <265e1e50186d5982b40d87f37f0662a0e09a7daa.1348755513.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/37361/
State Accepted
Commit 2bf5026933b733701d4d339e01a4f5e4468f368e
Headers show

Comments

Ross Burton - Sept. 27, 2012, 2:20 p.m.
From: Damien Lespiau <damien.lespiau@intel.com>

This patch make "mkdir foo" not fail if foo already exists.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/initrdscripts/files/init-live.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index fb7af31..2639308 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -21,15 +21,15 @@  ISOLINUX=""
 UNIONFS="no"
 
 early_setup() {
-    mkdir /proc
-    mkdir /sys
+    mkdir -p /proc
+    mkdir -p /sys
     mount -t proc proc /proc
     mount -t sysfs sysfs /sys
 
     # support modular kernel
     modprobe isofs 2> /dev/null
 
-    mkdir /run
+    mkdir -p /run
     udevd --daemon
     udevadm trigger --action=add
 }