Browse code

Merge "provide devstack lockout with .no-devstack file."

Jenkins authored on 2015/10/09 20:03:44
Showing 1 changed files
... ...
@@ -93,6 +93,15 @@ if [[ $EUID -eq 0 ]]; then
93 93
     exit 1
94 94
 fi
95 95
 
96
+# Provide a safety switch for devstack. If you do a lot of devstack,
97
+# on a lot of different environments, you sometimes run it on the
98
+# wrong box. This makes there be a way to prevent that.
99
+if [[ -e $HOME/.no-devstack ]]; then
100
+    echo "You've marked this host as a no-devstack host, to save yourself from"
101
+    echo "running devstack accidentally. If this is in error, please remove the"
102
+    echo "~/.no-devstack file"
103
+    exit 1
104
+fi
96 105
 
97 106
 # Prepare the environment
98 107
 # -----------------------