@@ -69,20 +69,11 @@ if [[ $EUID -eq 0 ]]; then
6969 echo " You are running this script as root."
7070 echo " Cut it out."
7171 echo " Really."
72- echo " If you need an account to run DevStack, do this (as root, heh) to create $STACK_USER :"
72+ echo " If you need an account to run DevStack, do this (as root, heh) to create a non-root account :"
7373 echo " $TOP_DIR /tools/create-stack-user.sh"
7474 exit 1
7575fi
7676
77- # Check to see if we are already running DevStack
78- # Note that this may fail if USE_SCREEN=False
79- if type -p screen > /dev/null && screen -ls | egrep -q " [0-9].$SCREEN_NAME " ; then
80- echo " You are already running a stack.sh session."
81- echo " To rejoin this session type 'screen -x stack'."
82- echo " To destroy this session, type './unstack.sh'."
83- exit 1
84- fi
85-
8677
8778# Prepare the environment
8879# -----------------------
@@ -130,6 +121,7 @@ if [[ -r $TOP_DIR/local.conf ]]; then
130121 done
131122fi
132123
124+
133125# ``stack.sh`` is customizable by setting environment variables. Override a
134126# default setting via export::
135127#
@@ -158,6 +150,15 @@ if [[ ! -r $TOP_DIR/stackrc ]]; then
158150fi
159151source $TOP_DIR /stackrc
160152
153+ # Check to see if we are already running DevStack
154+ # Note that this may fail if USE_SCREEN=False
155+ if type -p screen > /dev/null && screen -ls | egrep -q " [0-9]\.$SCREEN_NAME " ; then
156+ echo " You are already running a stack.sh session."
157+ echo " To rejoin this session type 'screen -x stack'."
158+ echo " To destroy this session, type './unstack.sh'."
159+ exit 1
160+ fi
161+
161162
162163# Local Settings
163164# --------------
0 commit comments