| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 2/8] standalone: Use mkdir -p
 These two mkdir calls could fail if
standalone-generate-dump-flight-runvars is run without a log
directory, because they were not concurrency-correct.
mkdir -p should fix that.
Signed-off-by: Ian Jackson <iwj@xxxxxxxxxxxxxx>
---
 standalone | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/standalone b/standalone
index 9553d6c9..4d1f3513 100755
--- a/standalone
+++ b/standalone
@@ -181,12 +181,8 @@ check_repos() {
 }
 
 ensure_logs() {
-    if [ ! -d "logs" ] ; then
-       mkdir "logs"
-    fi
-    if [ ! -d "logs/$flight" ] ; then
-       mkdir "logs/$flight"
-    fi
+    mkdir -p "logs"
+    mkdir -p "logs/$flight"
 }
 
 with_logging() {
-- 
2.20.1
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |