Add non-verbose output mode
Set VERBOSE=False to turn off the noise of stack.sh output. All
output still is written to the logfile if LOGFILE is set.
Rebased
Change-Id: I316bc4d68c997ec907a48e720e2f7778428d935b
diff --git a/lib/ceilometer b/lib/ceilometer
index 3ef4e06..0208753 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -16,9 +16,9 @@
# stop_XXX
# cleanup_XXX
-# 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
+# Save trace setting
+XTRACE=$(set +o | grep xtrace)
+set +o xtrace
# Defaults
@@ -71,3 +71,6 @@
screen_it ceilometer-collector "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-collector --config-file $CEILOMETER_COLLECTOR_CONF"
screen_it ceilometer-api "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR"
}
+
+# Restore xtrace
+$XTRACE
diff --git a/lib/cinder b/lib/cinder
index 250c029..de2debc 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -16,9 +16,9 @@
# stop_XXX
# cleanup_XXX
-# 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
+# Save trace setting
+XTRACE=$(set +o | grep xtrace)
+set +o xtrace
# Defaults
@@ -233,3 +233,6 @@
stop_service tgt
fi
}
+
+# Restore xtrace
+$XTRACE
diff --git a/lib/heat b/lib/heat
index 0b234c4..e713b39 100644
--- a/lib/heat
+++ b/lib/heat
@@ -15,9 +15,9 @@
# stop_XXX
# cleanup_XXX
-# 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
+# Save trace setting
+XTRACE=$(set +o | grep xtrace)
+set +o xtrace
# Defaults
@@ -178,3 +178,6 @@
# This function intentionally left blank
:
}
+
+# Restore xtrace
+$XTRACE
diff --git a/lib/keystone b/lib/keystone
index a6ab5a3..06920f8 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -18,9 +18,9 @@
# stop_keystone
# cleanup_keystone
-# 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
+# Save trace setting
+XTRACE=$(set +o | grep xtrace)
+set +o xtrace
# Defaults
@@ -170,3 +170,6 @@
# Kill the Keystone screen window
screen -S $SCREEN_NAME -p key -X kill
}
+
+# Restore xtrace
+$XTRACE
diff --git a/lib/n-vol b/lib/n-vol
index 99b8cb1..cc669cb 100644
--- a/lib/n-vol
+++ b/lib/n-vol
@@ -18,9 +18,9 @@
# stop_nvol
# cleanup_nvol
-# 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
+# Save trace setting
+XTRACE=$(set +o | grep xtrace)
+set +o xtrace
# Defaults
@@ -120,3 +120,6 @@
stop_service tgt
}
+
+# Restore xtrace
+$XTRACE
diff --git a/lib/template b/lib/template
index 78b848d..02de5ce 100644
--- a/lib/template
+++ b/lib/template
@@ -16,9 +16,9 @@
# stop_XXXX
# cleanup_XXXX
-# 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
+# Save trace setting
+XTRACE=$(set +o | grep xtrace)
+set +o xtrace
# Defaults
@@ -75,3 +75,6 @@
# FIXME(dtroyer): stop only our screen screen window?
:
}
+
+# Restore xtrace
+$XTRACE