From 65eeafaba6cae546eedcbd48589704ecfa612da7 Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 29 Nov 2005 19:39:43 +0000 Subject: [PATCH] Fix safe-start and safe-restart adding support for -q as well git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3093 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/changelog.txt | 2 ++ Shorewall/releasenotes.txt | 5 +++++ Shorewall/shorewall | 12 +++++++----- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index ff8f3886b..dd5aeed31 100755 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -6,6 +6,8 @@ Changes in 3.0.3 3) Applied Tuomo Soini's patch to pretty up the tc4shorewall files. +4) Fix 'safe-start' and 'safe'restart' -- add support for -q in the process. + Changes in 3.0.2 1) Typos in the Samples corrected. diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 6da5c8293..4df9c7fab 100755 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -9,11 +9,16 @@ Problems Corrected in 3.0.3 2) Thanks to Tuomo Soini, formatting of the comments in the tcdevices and tcclasses files has been cleaned up. +3) Specifying 'trace' on the 'safe-start' and 'safe-restart' command no + longer fails. + New Features in 3.0.3 1) A "shorewall show macros" command has been added. This command displays a list of the standard macros along with a brief description of each. +2) The '-q' option now works with 'safe-start' and 'safe-restart'. + Problems Corrected in 3.0.2 1) A couple of typos in the one-interface sample configuration have diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 81f3af1ec..65d579283 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -1288,6 +1288,8 @@ case "$1" in exit 2 fi + [ -n "$QUIET" ] && QUIET=-q + mutex_on if shorewall_is_started @@ -1300,7 +1302,7 @@ case "$1" in if [ "$1" = "safe-start" -a $running -eq 0 ] then # the command is safe-start but the firewall is already running - $0 nolock $debugging start + $0 $debugging nolock $QUIET start ret=$? mutex_off exit 0 @@ -1318,10 +1320,10 @@ case "$1" in if [ "$command" = "restart" ] then # save previous configuration - $0 nolock $debugging save "safe-start-restart" + $0 $debugging nolock save "safe-start-restart" fi - $0 nolock $debugging $command + $0 $debugging nolock $QUIET $command echo -n "Do you want to accept the new firewall configuration? [y/n] " read_yesno_with_timeout @@ -1336,10 +1338,10 @@ case "$1" in else if [ "$command" = "restart" ] then - $0 nolock $debugging restore "safe-start-restart" + $0 $debugging nolock restore "safe-start-restart" rm /var/lib/shorewall/safe-start-restart else - $0 nolock $debugging clear + $0 $debugging nolock clear fi mutex_off