mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02:00
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:
parent
4016d69b8d
commit
43be16f8b5
@ -19,7 +19,8 @@ Other changes in Shorewall 4.1.2.
|
|||||||
1) Shorewall 4.1.2 contains enhanced operational logging capabilities
|
1) Shorewall 4.1.2 contains enhanced operational logging capabilities
|
||||||
through a set of related enhancements to Shorewall-common and
|
through a set of related enhancements to Shorewall-common and
|
||||||
Shorewall-shell. The enhancements are not supported by
|
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
|
a) The STARTUP_LOG option in /etc/shorewall/shorewall.conf gives
|
||||||
the name of the Shorewall operational log. The log will be
|
the name of the Shorewall operational log. The log will be
|
||||||
|
@ -382,8 +382,6 @@ compiler() {
|
|||||||
$command perl $debugflags $pc $options $@
|
$command perl $debugflags $pc $options $@
|
||||||
;;
|
;;
|
||||||
shell)
|
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"
|
[ -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"
|
[ -n "$REFRESHCHAINS" ] && startup_error "Shorewall-shell does not support refresh of specific chains"
|
||||||
$command $SHOREWALL_SHELL $sc $@
|
$command $SHOREWALL_SHELL $sc $@
|
||||||
@ -1315,7 +1313,7 @@ export_command() # $* = original arguments less the command.
|
|||||||
#
|
#
|
||||||
usage() # $1 = exit status
|
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 "where <command> is one of:"
|
||||||
echo " add <interface>[:<host-list>] ... <zone>"
|
echo " add <interface>[:<host-list>] ... <zone>"
|
||||||
echo " allow <address> ..."
|
echo " allow <address> ..."
|
||||||
|
@ -149,7 +149,7 @@ get_config() {
|
|||||||
|
|
||||||
[ -n "${VERBOSITY:=2}" ]
|
[ -n "${VERBOSITY:=2}" ]
|
||||||
|
|
||||||
VERBOSE=$(($VERBOSE_OFFSET + $VERBOSITY))
|
[ -n "$USE_VERBOSITY" ] && VERBOSE=$USE_VERBOSITY || VERBOSE=$(($VERBOSE_OFFSET + $VERBOSITY))
|
||||||
|
|
||||||
export VERBOSE
|
export VERBOSE
|
||||||
|
|
||||||
@ -398,6 +398,7 @@ fi
|
|||||||
IPT_OPTIONS="-nv"
|
IPT_OPTIONS="-nv"
|
||||||
FAST=
|
FAST=
|
||||||
VERBOSE_OFFSET=0
|
VERBOSE_OFFSET=0
|
||||||
|
USE_VERBOSITY=
|
||||||
NOROUTES=
|
NOROUTES=
|
||||||
EXPORT=
|
EXPORT=
|
||||||
export TIMESTAMP=
|
export TIMESTAMP=
|
||||||
@ -432,8 +433,29 @@ while [ $finished -eq 0 ]; do
|
|||||||
option=${option#f}
|
option=${option#f}
|
||||||
;;
|
;;
|
||||||
v*)
|
v*)
|
||||||
VERBOSE_OFFSET=$(($VERBOSE_OFFSET + 1 ))
|
|
||||||
option=${option#v}
|
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*)
|
n*)
|
||||||
NOROUTES=Yes
|
NOROUTES=Yes
|
||||||
|
@ -358,9 +358,12 @@
|
|||||||
role="bold">v</emphasis> and <emphasis role="bold">q</emphasis>. If the
|
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
|
options are omitted, the amount of output is determined by the setting of
|
||||||
the VERBOSITY parameter in <ulink
|
the VERBOSITY parameter in <ulink
|
||||||
url="shorewall-lite.conf.html">shorewall-lite.conf</ulink>(5). Each
|
url="shorewall.conf.html">shorewall.conf</ulink>(5). Each <emphasis
|
||||||
<emphasis role="bold">v</emphasis> adds one to the effective verbosity and
|
role="bold">v</emphasis> adds one to the effective verbosity and each
|
||||||
each <emphasis role="bold">q</emphasis> subtracts one from the effective
|
<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>
|
VERBOSITY.</para>
|
||||||
|
|
||||||
<para>The <emphasis>options</emphasis> may also include the letter
|
<para>The <emphasis>options</emphasis> may also include the letter
|
||||||
|
@ -576,6 +576,9 @@
|
|||||||
url="shorewall.conf.html">shorewall.conf</ulink>(5). Each <emphasis
|
url="shorewall.conf.html">shorewall.conf</ulink>(5). Each <emphasis
|
||||||
role="bold">v</emphasis> adds one to the effective verbosity and each
|
role="bold">v</emphasis> adds one to the effective verbosity and each
|
||||||
<emphasis role="bold">q</emphasis> subtracts one from the effective
|
<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>
|
VERBOSITY.</para>
|
||||||
|
|
||||||
<para>The <emphasis>options</emphasis> may also include the letter
|
<para>The <emphasis>options</emphasis> may also include the letter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user