From e73f88e70b9f547bb8306f1f5715c898426f87b8 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 3 Feb 2016 06:58:39 -0500 Subject: [PATCH] tweak ps4 for readability After staring at a bunch of logs, try to crisp up the ps4 output for maximum readability. This also adds PS4 to all calling scripts by having a common PS4 in stackrc. It should make understanding when clean fails a bit more straight forward. Change-Id: Ia1f8dff5c1102c32c146a020a9f033c65d2c50de --- clean.sh | 1 + stack.sh | 1 - stackrc | 3 +++ unstack.sh | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/clean.sh b/clean.sh index c8b822317d..3db48585ec 100755 --- a/clean.sh +++ b/clean.sh @@ -51,6 +51,7 @@ source $TOP_DIR/lib/swift source $TOP_DIR/lib/heat source $TOP_DIR/lib/neutron-legacy +set -o xtrace # Extras Source # -------------- diff --git a/stack.sh b/stack.sh index d261787278..c21ff77742 100755 --- a/stack.sh +++ b/stack.sh @@ -23,7 +23,6 @@ # Print the commands being run so that we can see the command that triggers # an error. It is also useful for following along as the install occurs. set -o xtrace -export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' # Make sure custom grep options don't get in the way unset GREP_OPTIONS diff --git a/stackrc b/stackrc index 58146a4a1c..887d4b31ff 100644 --- a/stackrc +++ b/stackrc @@ -14,6 +14,9 @@ unset LANGUAGE LC_ALL=C export LC_ALL +# Make tracing more educational +export PS4='+ ${BASH_SOURCE}:${FUNCNAME[0]}:L${LINENO}: ' + # Find the other rc files RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd) diff --git a/unstack.sh b/unstack.sh index 8eded837fd..47beb04263 100755 --- a/unstack.sh +++ b/unstack.sh @@ -87,6 +87,8 @@ load_plugin_settings # ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME`` GetOSVersion +set -o xtrace + # Run extras # ==========