From e306f832e836bd855fe6ce7c8b06d50ca814b69d Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 6 Feb 2008 19:02:44 +0000 Subject: [PATCH] Correct verbosity and timestamp handling git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8154 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/lib.cli | 4 +++- Shorewall-common/shorewall | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Shorewall-common/lib.cli b/Shorewall-common/lib.cli index a96f22e5e..f88f7e961 100644 --- a/Shorewall-common/lib.cli +++ b/Shorewall-common/lib.cli @@ -870,7 +870,9 @@ heading() { make_verbose() { local v=$VERBOSE_OFFSET option=- - if [ $VERBOSE_OFFSET -gt 0 ]; then + if [ -n "$USE_VERBOSITY" ]; then + echo "-v$USE_VERBOSITY" + elif [ $VERBOSE_OFFSET -gt 0 ]; then while [ $v -gt 0 ]; do option="${option}v" v=$(($v - 1)) diff --git a/Shorewall-common/shorewall b/Shorewall-common/shorewall index 21a8fab42..09b34a8b2 100755 --- a/Shorewall-common/shorewall +++ b/Shorewall-common/shorewall @@ -1239,21 +1239,23 @@ reload_command() # $* = original arguments less the command. file=$(resolve_file $directory/firewall) - if shorewall $debugging $verbose compile -e $compiler $directory $directory/firewall && \ - progress_message "Copying $file and ${file}.conf to ${system}:${LITEDIR}..." && \ + [ -n "$TIMESTAMP" ] && timestamp='-t' || timestamp= + + if shorewall $debugging $verbose $timestamp compile -e $compiler $directory $directory/firewall && \ + progress_message3 "Copying $file and ${file}.conf to ${system}:${LITEDIR}..." && \ rcp_command "$directory/firewall $directory/firewall.conf" ${LITEDIR} then - echo "Copy complete" + progress_message3 "Copy complete" if [ $COMMAND = reload ]; then - rsh_command "/sbin/shorewall-lite $debugging $verbose restart" && \ + rsh_command "/sbin/shorewall-lite $debugging $verbose $timestamp restart" && \ progress_message3 "System $system reloaded" || saveit= else - rsh_command "/sbin/shorewall-lite $debugging $verbose start" && \ + rsh_command "/sbin/shorewall-lite $debugging $verbose $timestamp start" && \ progress_message3 "System $system loaded" || saveit= fi if [ -n "$saveit" ]; then - rsh_command "/sbin/shorewall-lite $debugging $verbose save" && \ + rsh_command "/sbin/shorewall-lite $debugging $verbose $timestamp save" && \ progress_message3 "Configuration on system $system saved" fi fi