From 303965768887ef75895c9890be1d8c22d1faf935 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Sun, 30 Jun 2013 16:11:54 -0700 Subject: [PATCH] Enable Fedora 19 on DevStack Fedora uses a special PROMPT_COMMAND for screen terminal types, which are the default with DevStack. The PROMPT_COMMAND interacts in a negative way with the -t and -X and -p flags, causing DevStack not to work. To solve this problem, this patch forces PROMPT_COMMAND to default to /bin/true, triggering no changes to the window title used within screen. Also this patch enables F19 as a non-FORCE distribution. Change-Id: I2414d9e28dd95b69272e132163b29ed83f73b2f6 Fixes: bug #1196340 --- functions | 2 ++ stack.sh | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/functions b/functions index 70ab999676..06d7e7b38b 100644 --- a/functions +++ b/functions @@ -1020,6 +1020,8 @@ function screen_rc { echo "sessionname $SCREEN_NAME" > $SCREENRC # Set a reasonable statusbar echo "hardstatus alwayslastline '$SCREEN_HARDSTATUS'" >> $SCREENRC + # Some distributions override PROMPT_COMMAND for the screen terminal type - turn that off + echo "setenv PROMPT_COMMAND /bin/true" >> $SCREENRC echo "screen -t shell bash" >> $SCREENRC fi # If this service doesn't already exist in the screenrc file diff --git a/stack.sh b/stack.sh index 57b8529e06..05b53afee1 100755 --- a/stack.sh +++ b/stack.sh @@ -109,7 +109,7 @@ disable_negated_services # Warn users who aren't on an explicitly supported distro, but allow them to # override check and attempt installation with ``FORCE=yes ./stack`` -if [[ ! ${DISTRO} =~ (oneiric|precise|quantal|raring|saucy|7.0|wheezy|sid|testing|jessie|f16|f17|f18|opensuse-12.2|rhel6) ]]; then +if [[ ! ${DISTRO} =~ (oneiric|precise|quantal|raring|saucy|7.0|wheezy|sid|testing|jessie|f16|f17|f18|f19|opensuse-12.2|rhel6) ]]; then echo "WARNING: this script has not been tested on $DISTRO" if [[ "$FORCE" != "yes" ]]; then die $LINENO "If you wish to run this script anyway run with FORCE=yes" @@ -830,6 +830,7 @@ if [[ "$USE_SCREEN" == "True" ]]; then SCREEN_HARDSTATUS='%{= .} %-Lw%{= .}%> %n%f %t*%{= .}%+Lw%< %-=%{g}(%{d}%H/%l%{g})' fi screen -r $SCREEN_NAME -X hardstatus alwayslastline "$SCREEN_HARDSTATUS" + screen -r $SCREEN_NAME -X setenv PROMPT_COMMAND /bin/true fi # Clear screen rc file