24 lines
762 B
Diff
24 lines
762 B
Diff
|
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
|