]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: only delete conf if -n 10543/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 2 Aug 2016 18:13:18 +0000 (14:13 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 2 Aug 2016 18:17:35 +0000 (14:17 -0400)
src/test/ceph_objectstore_tool.py depends on an implicit "-k" when not
creating a new cluster. (Deleting the conf file without -n makes no
sense anyway.)

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/vstart.sh

index 4f071270299f219f31188926d732d6bcbe5a98f5..6096b372cdfb3eef9f70f78428b825692e0133dd 100755 (executable)
@@ -290,7 +290,13 @@ if [ "$overwrite_conf" -eq 0 ]; then
     RGW=`$CEPH_BIN/ceph-conf -c $conf_fn --name $VSTART_SEC num_rgw 2>/dev/null` && \
         CEPH_NUM_RGW="$RGW"
 else
-       [ -e "$conf_fn" ] && rm -- "$conf_fn"
+    if [ "$new" -ne 0 ]; then
+        # only delete if -n
+        [ -e "$conf_fn" ] && rm -- "$conf_fn"
+    else
+        # -k is implied... (doesn't make sense otherwise)
+        overwrite_conf=0
+    fi
 fi
 
 if [ "$start_all" -eq 1 ]; then