From 3e1ed30f4eb82e0a2d0e0fb620a40071e0b81a5e Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 2 Jul 2013 14:23:27 -0700 Subject: [PATCH] Make initial progress message obey VERBOSITY Signed-off-by: Tom Eastep --- Shorewall-core/lib.cli | 1 + Shorewall/lib.cli-std | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 87a6779c2..88fb9d861 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -3369,6 +3369,7 @@ shorewall_cli() { g_haveconfig= g_conditional= g_file= + g_doing= VERBOSE= VERBOSITY=1 diff --git a/Shorewall/lib.cli-std b/Shorewall/lib.cli-std index ef9db4da1..a7e8c4c62 100644 --- a/Shorewall/lib.cli-std +++ b/Shorewall/lib.cli-std @@ -373,6 +373,8 @@ compiler() { # get_config Yes + progress_message3 "$g_doing..." + case $COMMAND in *start|try|refresh) ;; @@ -471,7 +473,7 @@ start_command() { rc=$? [ -n "$nolock" ] || mutex_off else - progress_message3 "Compiling..." + g_doing="Compiling" if compiler $g_debugging $nolock compile ${VARDIR}/.start; then run_postcompile ${VARDIR}/.start @@ -687,7 +689,7 @@ compile_command() { ;; esac - [ "x$g_file" = x- ] || progress_message3 "Compiling..." + [ "x$g_file" = x- ] || g_doing="Compiling" compiler $g_debugging compile $g_file && run_postcompile $g_file } @@ -766,7 +768,7 @@ check_command() { ;; esac - progress_message3 "Checking..." + g_doing="Checking" compiler $g_debugging $nolock check } @@ -858,7 +860,7 @@ update_command() { ;; esac - progress_message3 "Updating..." + g_doing="Updating..." compiler $g_debugging $nolock check } @@ -953,7 +955,7 @@ restart_command() { fi if [ -z "$g_fast" ]; then - progress_message3 "Compiling..." + g_doing="Compiling" if compiler $g_debugging $nolock compile ${VARDIR}/.restart; then run_postcompile ${VARDIR}/.restart @@ -1045,7 +1047,7 @@ refresh_command() { [ -n "$STARTUP_ENABLED" ] || fatal_error "Startup is disabled" - progress_message3 "Compiling..." + g_doing="Compiling" if compiler $g_debugging $nolock compile ${VARDIR}/.refresh; then run_postcompile ${VARDIR}/.refresh @@ -1156,7 +1158,7 @@ safe_commands() { command="restart" fi - progress_message3 "Compiling..." + g_doing="Compiling" if ! compiler $g_debugging nolock compile ${VARDIR}/.$command; then status=$? @@ -1289,7 +1291,7 @@ try_command() { command="restart" fi - progress_message3 "Compiling..." + g_doing="Compiling" if ! compiler $g_debugging $nolock compile ${VARDIR}/.$command; then status=$?