comment tweaks, provide CLEAN option to stack.sh

This commit is contained in:
Anthony Young 2011-09-13 10:05:07 -07:00
parent 7c3e5ed055
commit 1003952b16
2 changed files with 8 additions and 2 deletions

View file

@ -77,7 +77,7 @@ if [ "$COPYENV" = "1" ]; then
cp -pr ~/.bashrc $ROOTFS/opt/.bashrc cp -pr ~/.bashrc $ROOTFS/opt/.bashrc
fi fi
# give stack ownership over /opt so it may do the work needed # Give stack ownership over /opt so it may do the work needed
chroot $ROOTFS chown -R stack /opt chroot $ROOTFS chown -R stack /opt
# Configure instance network # Configure instance network

View file

@ -26,6 +26,13 @@ set -o xtrace
DIR=`pwd` DIR=`pwd`
DEST=/opt DEST=/opt
# Provide option to move aside any old code
if [ "$CLEAN" = "1"]; then
TMPDIR=/tmp/stackbak_`date +%s`
mkdir $TMPDIR
mv $DEST/* $TMPDIR
fi
# Set the destination directories for openstack projects # Set the destination directories for openstack projects
NOVA_DIR=$DEST/nova NOVA_DIR=$DEST/nova
DASH_DIR=$DEST/dash DASH_DIR=$DEST/dash
@ -249,7 +256,6 @@ rm -f $GLANCE_DIR/glance.sqlite
# nova api crashes if we start it with a regular screen command, # nova api crashes if we start it with a regular screen command,
# so send the start command by forcing text into the window. # so send the start command by forcing text into the window.
ENABLED_SERVICES=g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,dash
function screen_it { function screen_it {
screen -S nova -X screen -t $1 screen -S nova -X screen -t $1
# only run the services specified in $ENABLED_SERVICES # only run the services specified in $ENABLED_SERVICES