Fix try with effective verbosity = 0

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3721 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-03-23 23:26:41 +00:00
parent 959c9995fd
commit ab7b1eac9e
3 changed files with 40 additions and 34 deletions

View File

@ -1,3 +1,7 @@
Changes in 3.2.0 Beta 3
1) Correct handling of verbosity in the 'try' command.
Changes in 3.2.0 Beta 2
1) Make "shorewall start -f" work correctly.

View File

@ -1,4 +1,4 @@
Shorewall 3.2.0 Beta 2.
Shorewall 3.2.0 Beta 3.
Note to users upgrading from Shorewall 2.x or 3.0
@ -27,32 +27,14 @@ Note to users upgrading from Shorewall 2.x or 3.0
Please see the "Migration Considerations" below for additional upgrade
information.
Problems Corrected in 3.2.0 Beta 2
Problems Corrected in 3.2.0 Beta 3
1) The Makefile is now sensitive to the RESTOREFILE variable if that
variable is defined at make time. The /sbin/shorewall script has been
updated to define RESTOREFILE when it invokes 'make' during processing
of the "shorewall start -f" command.
2) Code involving SUBSYSLOCK has been removed from the default and Debian
program footers. SUBSYSLOCK only applies to programs installed in
/etc/init.d/.
1) The 'try' command with an effective verbosity of zero resulted in an
error message and the command failed.
Other changes in 3.2.0 Beta 2
1) A 'refreshed' extension script has been added -- it is executed after
"shorewall refresh" has finished.
2) Two new dynamic blacklisting commands have been added:
logdrop -- like 'drop' but causes the dropped packets to be logged.
logreject -- like 'reject' but causes the rejected packets to be
logged.
Packets are logged at the BLACKLIST_LOGLEVEL if one was specified at the
last "shorewall [re]start"; otherwise, they are logged at the 'info'
log level.
None.
Migration Considerations:
@ -353,3 +335,18 @@ New Features:
07:09:05 Restarting Shorewall....
07:09:08 done.
gateway:/etc/shorewall #
7) A 'refreshed' extension script has been added -- it is executed after
"shorewall refresh" has finished.
8) Two new dynamic blacklisting commands have been added:
logdrop -- like 'drop' but causes the dropped packets to be logged.
logreject -- like 'reject' but causes the rejected packets to be
logged.
Packets are logged at the BLACKLIST_LOGLEVEL if one was specified at the
last "shorewall [re]start"; otherwise, they are logged at the 'info'
log level.

View File

@ -263,7 +263,7 @@ get_config() {
[ -n "${VERBOSITY:=2}" ]
VERBOSE=$(($VERBOSE + $VERBOSITY))
VERBOSE=$(($VERBOSE_OFFSET + $VERBOSITY))
export VERBOSE
@ -857,7 +857,7 @@ show_command() {
option=
;;
v*)
VERBOSE=$(($VERBOSE + 1 ))
VERBOSE_OFFSET=$(($VERBOSE_OFFSET + 1 ))
option=${option#v}
;;
x*)
@ -1383,19 +1383,24 @@ heading() {
}
#
# Create the appropriate -q option to pass oneward
# Create the appropriate -q option to pass onward
#
make_verbose() {
local v=$VERBOSE
if [ $VERBOSE -gt 0 ]; then
local option=-
local v=$VERBOSE_OFFSET option=-
if [ $VERBOSE_OFFSET -gt 0 ]; then
while [ $v -gt 0 ]; do
option="${option}v"
v=$(($v - 1))
done
echo $option
elif [ $VERBOSE_OFFSET -lt 0 ]; then
while [ $v -lt 0 ]; do
option="${option}q"
v=$(($v + 1))
done
echo $option
fi
}
@ -1420,7 +1425,7 @@ fi
SHOREWALL_DIR=
IPT_OPTIONS="-nv"
FAST=
VERBOSE=0
VERBOSE_OFFSET=0
NOROUTES=
EXPORT=
export TIMESTAMP=
@ -1466,7 +1471,7 @@ while [ $finished -eq 0 ]; do
option=${option#x}
;;
q*)
VERBOSE=$(($VERBOSE - 1 ))
VERBOSE_OFFSET=$(($VERBOSE_OFFSET - 1 ))
option=${option#q}
;;
f*)
@ -1474,7 +1479,7 @@ while [ $finished -eq 0 ]; do
option=${option#f}
;;
v*)
VERBOSE=$(($VERBOSE + 1 ))
VERBOSE_OFFSET=$(($VERBOSE_OFFSET + 1 ))
option=${option#v}
;;
n*)
@ -1707,7 +1712,7 @@ case "$COMMAND" in
try)
[ -n "$SHOREWALL_DIR" ] && startup_error "ERROR: -c option may not be used with \"try\""
[ $# -lt 2 -o $# -gt 3 ] && usage 1
[ $VERBOSE -gt 0 ] && VERBOSE=$(make_verbose)
VERBOSE=$(make_verbose)
[ -n "$NOROUTES" ] && NOROUTES=-n
if ! $0 $debugging $VERBOSE -c $2 restart; then
if ! $IPTABLES -L shorewall > /dev/null 2> /dev/null; then