summaryrefslogtreecommitdiffstats
path: root/0066-dracut-functions.sh-mksubdirs-check-for-dir-existenc.patch
diff options
context:
space:
mode:
Diffstat (limited to '0066-dracut-functions.sh-mksubdirs-check-for-dir-existenc.patch')
-rw-r--r--0066-dracut-functions.sh-mksubdirs-check-for-dir-existenc.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/0066-dracut-functions.sh-mksubdirs-check-for-dir-existenc.patch b/0066-dracut-functions.sh-mksubdirs-check-for-dir-existenc.patch
new file mode 100644
index 0000000..9084fdf
--- /dev/null
+++ b/0066-dracut-functions.sh-mksubdirs-check-for-dir-existenc.patch
@@ -0,0 +1,23 @@
+From 68966a1d7e6dc9d6be054effa62d61836704714b Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald@redhat.com>
+Date: Fri, 22 Jun 2012 08:58:39 +0200
+Subject: [PATCH] dracut-functions.sh: mksubdirs(): check for dir existence
+ first
+
+---
+ dracut-functions.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dracut-functions.sh b/dracut-functions.sh
+index ace5a0b..3b562e7 100755
+--- a/dracut-functions.sh
++++ b/dracut-functions.sh
+@@ -74,7 +74,7 @@ fi
+
+ # Create all subdirectories for given path without creating the last element.
+ # $1 = path
+-mksubdirs() { mkdir -m 0755 -p ${1%/*}; }
++mksubdirs() { [[ -e ${1%/*} ]] || mkdir -m 0755 -p ${1%/*}; }
+
+ # Version comparision function. Assumes Linux style version scheme.
+ # $1 = version a