From 61bb2c1b5c5fe406300fd184a2249a0b0c9bb622 Mon Sep 17 00:00:00 2001 From: Jiajun Liu Date: Fri, 19 Oct 2012 09:48:30 +0800 Subject: [PATCH] clear screen rc file every time you run stack.sh fixes bug 1032022. Devstack will not update service's start up command if the command already exists in screen rc files due to previous deployment. There is no way to clear a service's start up command so this would be a problem if the service's start up command changes between different deployment. Clear the content of screen rc file every time you run stack.sh to deploy openstack can solve this problem. Change-Id: I18d0700bb2169bdb0dadfa7982168aef2eff8b22 --- stack.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stack.sh b/stack.sh index 774c454c2d..4904576aea 100755 --- a/stack.sh +++ b/stack.sh @@ -1022,6 +1022,11 @@ if [ -z "$SCREEN_HARDSTATUS" ]; then SCREEN_HARDSTATUS='%{= .} %-Lw%{= .}%> %n%f %t*%{= .}%+Lw%< %-=%{g}(%{d}%H/%l%{g})' fi +# Clear screen rc file +SCREENRC=$TOP_DIR/$SCREEN_NAME-screenrc +if [[ -e $SCREENRC ]]; then + echo -n > $SCREENRC +fi # Create a new named screen to run processes in screen -d -m -S $SCREEN_NAME -t shell -s /bin/bash sleep 1