JBAS-415 warn when leaving brick detached
authorBill Erickson <berickxx@gmail.com>
Tue, 10 Mar 2015 16:16:37 +0000 (12:16 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/misc-scripts/eg-updater.sh

index 29cca58..3ff13ba 100755 (executable)
@@ -478,10 +478,14 @@ else
     fi;
 fi
 
-if [ -n "$REATTACH" -a -z "$SKIP_DETACH" ]; then
-    announce "Reattaching brick after $START_SLEEP seconds"
-    sleep $START_SLEEP;
-    $OSRF mv $PING_FILE- $PING_FILE
+if [ -z "$SKIP_DETACH" ]; then
+    if [ -n "$REATTACH" ]; then
+        announce "Reattaching brick after $START_SLEEP seconds"
+        sleep $START_SLEEP;
+        $OSRF mv $PING_FILE- $PING_FILE
+    else
+        announce "Brick is still detached!  Use -a to automatically re-attach"
+    fi
 fi;
 
 SUCCESS=1