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
| ... | ... |
@@ -1022,6 +1022,11 @@ if [ -z "$SCREEN_HARDSTATUS" ]; then |
| 1022 | 1022 |
SCREEN_HARDSTATUS='%{= .} %-Lw%{= .}%> %n%f %t*%{= .}%+Lw%< %-=%{g}(%{d}%H/%l%{g})'
|
| 1023 | 1023 |
fi |
| 1024 | 1024 |
|
| 1025 |
+# Clear screen rc file |
|
| 1026 |
+SCREENRC=$TOP_DIR/$SCREEN_NAME-screenrc |
|
| 1027 |
+if [[ -e $SCREENRC ]]; then |
|
| 1028 |
+ echo -n > $SCREENRC |
|
| 1029 |
+fi |
|
| 1025 | 1030 |
# Create a new named screen to run processes in |
| 1026 | 1031 |
screen -d -m -S $SCREEN_NAME -t shell -s /bin/bash |
| 1027 | 1032 |
sleep 1 |