mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 22:30:58 +01:00
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:
parent
959c9995fd
commit
ab7b1eac9e
@ -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
|
Changes in 3.2.0 Beta 2
|
||||||
|
|
||||||
1) Make "shorewall start -f" work correctly.
|
1) Make "shorewall start -f" work correctly.
|
||||||
|
@ -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
|
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
|
Please see the "Migration Considerations" below for additional upgrade
|
||||||
information.
|
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
|
1) The 'try' command with an effective verbosity of zero resulted in an
|
||||||
variable is defined at make time. The /sbin/shorewall script has been
|
error message and the command failed.
|
||||||
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/.
|
|
||||||
|
|
||||||
Other changes in 3.2.0 Beta 2
|
Other changes in 3.2.0 Beta 2
|
||||||
|
|
||||||
1) A 'refreshed' extension script has been added -- it is executed after
|
None.
|
||||||
"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.
|
|
||||||
|
|
||||||
Migration Considerations:
|
Migration Considerations:
|
||||||
|
|
||||||
@ -353,3 +335,18 @@ New Features:
|
|||||||
07:09:05 Restarting Shorewall....
|
07:09:05 Restarting Shorewall....
|
||||||
07:09:08 done.
|
07:09:08 done.
|
||||||
gateway:/etc/shorewall #
|
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.
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ get_config() {
|
|||||||
|
|
||||||
[ -n "${VERBOSITY:=2}" ]
|
[ -n "${VERBOSITY:=2}" ]
|
||||||
|
|
||||||
VERBOSE=$(($VERBOSE + $VERBOSITY))
|
VERBOSE=$(($VERBOSE_OFFSET + $VERBOSITY))
|
||||||
|
|
||||||
export VERBOSE
|
export VERBOSE
|
||||||
|
|
||||||
@ -857,7 +857,7 @@ show_command() {
|
|||||||
option=
|
option=
|
||||||
;;
|
;;
|
||||||
v*)
|
v*)
|
||||||
VERBOSE=$(($VERBOSE + 1 ))
|
VERBOSE_OFFSET=$(($VERBOSE_OFFSET + 1 ))
|
||||||
option=${option#v}
|
option=${option#v}
|
||||||
;;
|
;;
|
||||||
x*)
|
x*)
|
||||||
@ -1383,19 +1383,24 @@ heading() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create the appropriate -q option to pass oneward
|
# Create the appropriate -q option to pass onward
|
||||||
#
|
#
|
||||||
make_verbose() {
|
make_verbose() {
|
||||||
local v=$VERBOSE
|
local v=$VERBOSE_OFFSET option=-
|
||||||
|
|
||||||
if [ $VERBOSE -gt 0 ]; then
|
|
||||||
local option=-
|
|
||||||
|
|
||||||
|
if [ $VERBOSE_OFFSET -gt 0 ]; then
|
||||||
while [ $v -gt 0 ]; do
|
while [ $v -gt 0 ]; do
|
||||||
option="${option}v"
|
option="${option}v"
|
||||||
v=$(($v - 1))
|
v=$(($v - 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo $option
|
||||||
|
elif [ $VERBOSE_OFFSET -lt 0 ]; then
|
||||||
|
while [ $v -lt 0 ]; do
|
||||||
|
option="${option}q"
|
||||||
|
v=$(($v + 1))
|
||||||
|
done
|
||||||
|
|
||||||
echo $option
|
echo $option
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -1420,7 +1425,7 @@ fi
|
|||||||
SHOREWALL_DIR=
|
SHOREWALL_DIR=
|
||||||
IPT_OPTIONS="-nv"
|
IPT_OPTIONS="-nv"
|
||||||
FAST=
|
FAST=
|
||||||
VERBOSE=0
|
VERBOSE_OFFSET=0
|
||||||
NOROUTES=
|
NOROUTES=
|
||||||
EXPORT=
|
EXPORT=
|
||||||
export TIMESTAMP=
|
export TIMESTAMP=
|
||||||
@ -1466,7 +1471,7 @@ while [ $finished -eq 0 ]; do
|
|||||||
option=${option#x}
|
option=${option#x}
|
||||||
;;
|
;;
|
||||||
q*)
|
q*)
|
||||||
VERBOSE=$(($VERBOSE - 1 ))
|
VERBOSE_OFFSET=$(($VERBOSE_OFFSET - 1 ))
|
||||||
option=${option#q}
|
option=${option#q}
|
||||||
;;
|
;;
|
||||||
f*)
|
f*)
|
||||||
@ -1474,7 +1479,7 @@ while [ $finished -eq 0 ]; do
|
|||||||
option=${option#f}
|
option=${option#f}
|
||||||
;;
|
;;
|
||||||
v*)
|
v*)
|
||||||
VERBOSE=$(($VERBOSE + 1 ))
|
VERBOSE_OFFSET=$(($VERBOSE_OFFSET + 1 ))
|
||||||
option=${option#v}
|
option=${option#v}
|
||||||
;;
|
;;
|
||||||
n*)
|
n*)
|
||||||
@ -1707,7 +1712,7 @@ case "$COMMAND" in
|
|||||||
try)
|
try)
|
||||||
[ -n "$SHOREWALL_DIR" ] && startup_error "ERROR: -c option may not be used with \"try\""
|
[ -n "$SHOREWALL_DIR" ] && startup_error "ERROR: -c option may not be used with \"try\""
|
||||||
[ $# -lt 2 -o $# -gt 3 ] && usage 1
|
[ $# -lt 2 -o $# -gt 3 ] && usage 1
|
||||||
[ $VERBOSE -gt 0 ] && VERBOSE=$(make_verbose)
|
VERBOSE=$(make_verbose)
|
||||||
[ -n "$NOROUTES" ] && NOROUTES=-n
|
[ -n "$NOROUTES" ] && NOROUTES=-n
|
||||||
if ! $0 $debugging $VERBOSE -c $2 restart; then
|
if ! $0 $debugging $VERBOSE -c $2 restart; then
|
||||||
if ! $IPTABLES -L shorewall > /dev/null 2> /dev/null; then
|
if ! $IPTABLES -L shorewall > /dev/null 2> /dev/null; then
|
||||||
|
Loading…
Reference in New Issue
Block a user