Merge "Fix to avoid undefined variables in initial sanity checks"
This commit is contained in:
commit
3d458eb703
21
stack.sh
21
stack.sh
@ -69,20 +69,11 @@ if [[ $EUID -eq 0 ]]; then
|
||||
echo "You are running this script as root."
|
||||
echo "Cut it out."
|
||||
echo "Really."
|
||||
echo "If you need an account to run DevStack, do this (as root, heh) to create $STACK_USER:"
|
||||
echo "If you need an account to run DevStack, do this (as root, heh) to create a non-root account:"
|
||||
echo "$TOP_DIR/tools/create-stack-user.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check to see if we are already running DevStack
|
||||
# Note that this may fail if USE_SCREEN=False
|
||||
if type -p screen >/dev/null && screen -ls | egrep -q "[0-9].$SCREEN_NAME"; then
|
||||
echo "You are already running a stack.sh session."
|
||||
echo "To rejoin this session type 'screen -x stack'."
|
||||
echo "To destroy this session, type './unstack.sh'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Prepare the environment
|
||||
# -----------------------
|
||||
@ -130,6 +121,7 @@ if [[ -r $TOP_DIR/local.conf ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# ``stack.sh`` is customizable by setting environment variables. Override a
|
||||
# default setting via export::
|
||||
#
|
||||
@ -158,6 +150,15 @@ if [[ ! -r $TOP_DIR/stackrc ]]; then
|
||||
fi
|
||||
source $TOP_DIR/stackrc
|
||||
|
||||
# Check to see if we are already running DevStack
|
||||
# Note that this may fail if USE_SCREEN=False
|
||||
if type -p screen > /dev/null && screen -ls | egrep -q "[0-9]\.$SCREEN_NAME"; then
|
||||
echo "You are already running a stack.sh session."
|
||||
echo "To rejoin this session type 'screen -x stack'."
|
||||
echo "To destroy this session, type './unstack.sh'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Local Settings
|
||||
# --------------
|
||||
|
Loading…
Reference in New Issue
Block a user