Add new verbosity control to shorewall-lite and manpages

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7731 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-11-23 21:49:06 +00:00
parent 4016d69b8d
commit 43be16f8b5
5 changed files with 36 additions and 9 deletions

View File

@ -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

View File

@ -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 ] <command>"
echo "Usage: $(basename $0) [debug|trace] [nolock] [ -q ] [ -v[-1|{0-2}] ] [ -t ] <command>"
echo "where <command> is one of:"
echo " add <interface>[:<host-list>] ... <zone>"
echo " allow <address> ..."

View File

@ -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

View File

@ -358,9 +358,12 @@
role="bold">v</emphasis> and <emphasis role="bold">q</emphasis>. If the
options are omitted, the amount of output is determined by the setting of
the VERBOSITY parameter in <ulink
url="shorewall-lite.conf.html">shorewall-lite.conf</ulink>(5). Each
<emphasis role="bold">v</emphasis> adds one to the effective verbosity and
each <emphasis role="bold">q</emphasis> subtracts one from the effective
url="shorewall.conf.html">shorewall.conf</ulink>(5). Each <emphasis
role="bold">v</emphasis> adds one to the effective verbosity and each
<emphasis role="bold">q</emphasis> subtracts one from the effective
VERBOSITY. Anternately, <emphasis role="bold">v</emphasis> may be followed
immediately with one of -1,0,1,2 to specify a specify VERBOSITY. There may
be no white space between <emphasis role="bold">v</emphasis> and the
VERBOSITY.</para>
<para>The <emphasis>options</emphasis> may also include the letter

View File

@ -576,6 +576,9 @@
url="shorewall.conf.html">shorewall.conf</ulink>(5). Each <emphasis
role="bold">v</emphasis> adds one to the effective verbosity and each
<emphasis role="bold">q</emphasis> subtracts one from the effective
VERBOSITY. Anternately, <emphasis role="bold">v</emphasis> may be followed
immediately with one of -1,0,1,2 to specify a specify VERBOSITY. There may
be no white space between <emphasis role="bold">v</emphasis> and the
VERBOSITY.</para>
<para>The <emphasis>options</emphasis> may also include the letter