diff --git a/Shorewall-common/releasenotes.txt b/Shorewall-common/releasenotes.txt index ba0adee7d..d7101d126 100644 --- a/Shorewall-common/releasenotes.txt +++ b/Shorewall-common/releasenotes.txt @@ -19,7 +19,8 @@ Other changes in Shorewall 4.1.2. 1) Shorewall 4.1.2 contains enhanced operational logging capabilities through a set of related enhancements to Shorewall-common and Shorewall-shell. The enhancements are not supported by - Shorewall-shell. + Shorewall-shell nor are they supported by Shorewall-lite except + when the script is compiled using Shorewall-perl. a) The STARTUP_LOG option in /etc/shorewall/shorewall.conf gives the name of the Shorewall operational log. The log will be diff --git a/Shorewall-common/shorewall b/Shorewall-common/shorewall index b1be55769..a9cee4dde 100755 --- a/Shorewall-common/shorewall +++ b/Shorewall-common/shorewall @@ -382,8 +382,6 @@ compiler() { $command perl $debugflags $pc $options $@ ;; shell) - LOG_VERBOSE=$LOG_VERBOSITY - export STARTUP_LOG LOG_VERBOSE [ -x $sc ] || startup_error "SHOREWALL_COMPILER=shell requires the shorewall-shell package which is not installed" [ -n "$REFRESHCHAINS" ] && startup_error "Shorewall-shell does not support refresh of specific chains" $command $SHOREWALL_SHELL $sc $@ @@ -1315,7 +1313,7 @@ export_command() # $* = original arguments less the command. # usage() # $1 = exit status { - echo "Usage: $(basename $0) [debug|trace] [nolock] [ -q ] [ -v ] [ -t ] " + echo "Usage: $(basename $0) [debug|trace] [nolock] [ -q ] [ -v[-1|{0-2}] ] [ -t ] " echo "where is one of:" echo " add [:] ... " echo " allow
..." diff --git a/Shorewall-lite/shorewall-lite b/Shorewall-lite/shorewall-lite index 61d3d16eb..66198b895 100755 --- a/Shorewall-lite/shorewall-lite +++ b/Shorewall-lite/shorewall-lite @@ -149,7 +149,7 @@ get_config() { [ -n "${VERBOSITY:=2}" ] - VERBOSE=$(($VERBOSE_OFFSET + $VERBOSITY)) + [ -n "$USE_VERBOSITY" ] && VERBOSE=$USE_VERBOSITY || VERBOSE=$(($VERBOSE_OFFSET + $VERBOSITY)) export VERBOSE @@ -398,6 +398,7 @@ fi IPT_OPTIONS="-nv" FAST= VERBOSE_OFFSET=0 +USE_VERBOSITY= NOROUTES= EXPORT= export TIMESTAMP= @@ -432,8 +433,29 @@ while [ $finished -eq 0 ]; do option=${option#f} ;; v*) - VERBOSE_OFFSET=$(($VERBOSE_OFFSET + 1 )) option=${option#v} + case $option in + -1*) + USE_VERBOSITY=-1 + option=${option#-1} + ;; + 0*) + USE_VERBOSITY=0 + option=${option#0} + ;; + 1*) + USE_VERBOSITY=1 + option=${option#1} + ;; + 2*) + USE_VERBOSITY=2 + option=${option#2} + ;; + *) + VERBOSE_OFFSET=$(($VERBOSE_OFFSET + 1 )) + USE_VERBOSITY= + ;; + esac ;; n*) NOROUTES=Yes diff --git a/manpages-lite/shorewall-lite.xml b/manpages-lite/shorewall-lite.xml index 2b039a9a7..14f01692e 100644 --- a/manpages-lite/shorewall-lite.xml +++ b/manpages-lite/shorewall-lite.xml @@ -358,9 +358,12 @@ role="bold">v and q. If the options are omitted, the amount of output is determined by the setting of the VERBOSITY parameter in shorewall-lite.conf(5). Each - v adds one to the effective verbosity and - each q subtracts one from the effective + url="shorewall.conf.html">shorewall.conf(5). Each v adds one to the effective verbosity and each + q subtracts one from the effective + VERBOSITY. Anternately, v may be followed + immediately with one of -1,0,1,2 to specify a specify VERBOSITY. There may + be no white space between v and the VERBOSITY. The options may also include the letter diff --git a/manpages/shorewall.xml b/manpages/shorewall.xml index 1ba51aadb..6b7f487a6 100644 --- a/manpages/shorewall.xml +++ b/manpages/shorewall.xml @@ -576,6 +576,9 @@ url="shorewall.conf.html">shorewall.conf(5). Each v adds one to the effective verbosity and each q subtracts one from the effective + VERBOSITY. Anternately, v may be followed + immediately with one of -1,0,1,2 to specify a specify VERBOSITY. There may + be no white space between v and the VERBOSITY. The options may also include the letter