This lets you specify that devstack should not be run by the user on
the box that you are on. Helps with running commands in the wrong
window.
Change-Id: I7aa26df1a2e02331d596bbfefb0697937787252f
| ... | ... |
@@ -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 |
# ----------------------- |