diff --git a/Shorewall-lite/shorecap b/Shorewall-lite/shorecap index ba08b336c..24ff83268 100755 --- a/Shorewall-lite/shorecap +++ b/Shorewall-lite/shorecap @@ -59,7 +59,7 @@ VERSION=$(cat /usr/share/shorewall-lite/version) [ -n "$IPTABLES" ] || IPTABLES=$(mywhich iptables) -VERBOSE=0 +VERBOSITY=0 load_kernel_modules No determine_capabilities report_capabilities1 diff --git a/Shorewall-lite/shorewall-lite b/Shorewall-lite/shorewall-lite index 7b13c7f63..5b33981b3 100755 --- a/Shorewall-lite/shorewall-lite +++ b/Shorewall-lite/shorewall-lite @@ -149,9 +149,9 @@ get_config() { [ -n "${VERBOSITY:=2}" ] - [ -n "$g_use_verbosity" ] && VERBOSE=$g_use_verbosity || VERBOSE=$(($g_verbose_offset + $VERBOSITY)) + [ -n "$g_use_verbosity" ] && VERBOSITY=$g_use_verbosity || VERBOSITY=$(($g_verbose_offset + $VERBOSITY)) - export VERBOSE + export VERBOSITY [ -n "${HOSTNAME:=$(hostname)}" ] diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm index 706dea0a8..3db5ef102 100644 --- a/Shorewall/Perl/Shorewall/Compiler.pm +++ b/Shorewall/Perl/Shorewall/Compiler.pm @@ -216,7 +216,7 @@ sub generate_script_2() { my @dont_load = split_list $config{DONT_LOAD}, 'module'; emit ( '[ -n "${COMMAND:=restart}" ]', - '[ -n "${VERBOSE:=0}" ]', + '[ -n "${VERBOSITY:=0}" ]', qq([ -n "\${RESTOREFILE:=$config{RESTOREFILE}}" ]) ); emit ( qq(VERSION="$globals{VERSION}") ) unless $test; diff --git a/Shorewall/Perl/prog.footer b/Shorewall/Perl/prog.footer index 1b5684eee..e9396b915 100644 --- a/Shorewall/Perl/prog.footer +++ b/Shorewall/Perl/prog.footer @@ -24,6 +24,8 @@ if [ $# -gt 1 ]; then fi fi +[ -z "$VERBOSITY" ] && [ -n "$VERBOSE" ] & VERBOSITY=$VERBOSE + initialize if [ -n "$STARTUP_LOG" ]; then @@ -51,11 +53,11 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do while [ -n "$option" ]; do case $option in v*) - VERBOSE=$(($VERBOSE + 1 )) + VERBOSITY=$(($VERBOSITY + 1 )) option=${option#v} ;; q*) - VERBOSE=$(($VERBOSE - 1 )) + VERBOSITY=$(($VERBOSITY - 1 )) option=${option#q} ;; n*) @@ -81,7 +83,7 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do if [ -n "$option" ]; then case $option in -1|0|1|2) - VERBOSE=$option + VERBOSITY=$option option= ;; *) diff --git a/Shorewall/Perl/prog.footer6 b/Shorewall/Perl/prog.footer6 index 6e28596ed..4c513fce6 100644 --- a/Shorewall/Perl/prog.footer6 +++ b/Shorewall/Perl/prog.footer6 @@ -24,6 +24,8 @@ if [ $# -gt 1 ]; then fi fi +[ -z "$VERBOSITY" ] && [ -n "$VERBOSE" ] & VERBOSITY=$VERBOSE + initialize if [ -n "$STARTUP_LOG" ]; then @@ -51,11 +53,11 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do while [ -n "$option" ]; do case $option in v*) - VERBOSE=$(($VERBOSE + 1 )) + VERBOSITY=$(($VERBOSITY + 1 )) option=${option#v} ;; q*) - VERBOSE=$(($VERBOSE - 1 )) + VERBOSITY=$(($VERBOSITY - 1 )) option=${option#q} ;; n*) @@ -81,7 +83,7 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do if [ -n "$option" ]; then case $option in -1|0|1|2) - VERBOSE=$option + VERBOSITY=$option option= ;; *) diff --git a/Shorewall/Perl/prog.header b/Shorewall/Perl/prog.header index 73248f72a..96e5b6b35 100644 --- a/Shorewall/Perl/prog.header +++ b/Shorewall/Perl/prog.header @@ -38,7 +38,7 @@ progress_message() # $* = Message local timestamp timestamp= - if [ $VERBOSE -gt 1 ]; then + if [ $VERBOSITY -gt 1 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi @@ -54,7 +54,7 @@ progress_message2() # $* = Message local timestamp timestamp= - if [ $VERBOSE -gt 0 ]; then + if [ $VERBOSITY -gt 0 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi @@ -70,7 +70,7 @@ progress_message3() # $* = Message local timestamp timestamp= - if [ $VERBOSE -ge 0 ]; then + if [ $VERBOSITY -ge 0 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi diff --git a/Shorewall/Perl/prog.header6 b/Shorewall/Perl/prog.header6 index 82a25e51b..a5260d079 100644 --- a/Shorewall/Perl/prog.header6 +++ b/Shorewall/Perl/prog.header6 @@ -38,7 +38,7 @@ progress_message() # $* = Message local timestamp timestamp= - if [ $VERBOSE -gt 1 ]; then + if [ $VERBOSITY -gt 1 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi @@ -54,7 +54,7 @@ progress_message2() # $* = Message local timestamp timestamp= - if [ $VERBOSE -gt 0 ]; then + if [ $VERBOSITY -gt 0 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi @@ -70,7 +70,7 @@ progress_message3() # $* = Message local timestamp timestamp= - if [ $VERBOSE -ge 0 ]; then + if [ $VERBOSITY -ge 0 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi diff --git a/Shorewall/lib.base b/Shorewall/lib.base index c88b223c8..a179545d1 100644 --- a/Shorewall/lib.base +++ b/Shorewall/lib.base @@ -52,7 +52,7 @@ progress_message() # $* = Message local timestamp timestamp= - if [ $VERBOSE -gt 1 ]; then + if [ $VERBOSITY -gt 1 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi @@ -63,7 +63,7 @@ progress_message2() # $* = Message local timestamp timestamp= - if [ $VERBOSE -gt 0 ]; then + if [ $VERBOSITY -gt 0 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi @@ -74,7 +74,7 @@ progress_message3() # $* = Message local timestamp timestamp= - if [ $VERBOSE -ge 0 ]; then + if [ $VERBOSITY -ge 0 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi @@ -990,7 +990,7 @@ report_capabilities() { echo " " $1: $setting } - if [ $VERBOSE -gt 1 ]; then + if [ $VERBOSITY -gt 1 ]; then echo "Shorewall has detected the following iptables/netfilter capabilities:" report_capability "NAT" $NAT_ENABLED report_capability "Packet Mangling" $MANGLE_ENABLED diff --git a/Shorewall/lib.cli b/Shorewall/lib.cli index 1b6cf155f..65d69cf6e 100644 --- a/Shorewall/lib.cli +++ b/Shorewall/lib.cli @@ -151,7 +151,7 @@ syslog_circular_buffer() { # packet_log() # $1 = number of messages { - if [ -n "$g_showmacs" -o $VERBOSE -gt 2 ]; then + if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then $g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | head -n$1 | tac | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/ else $g_logread | grep 'IN=.* OUT=.*SRC=.*\..*DST=' | head -n$1 | tac | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/ @@ -458,7 +458,7 @@ show_command() { option= ;; v*) - VERBOSE=$(($VERBOSE + 1 )) + VERBOSITY=$(($VERBOSITY + 1 )) option=${option#v} ;; x*) @@ -587,7 +587,7 @@ show_command() { capabilities) [ $# -gt 1 ] && usage 1 determine_capabilities - VERBOSE=2 + VERBOSITY=2 if [ -n "$g_filemode" ]; then report_capabilities1 else @@ -778,7 +778,7 @@ dump_command() { g_ipt_options="$g_ipt_options $g_ipt_options1" - [ $VERBOSE -lt 2 ] && VERBOSE=2 + [ $VERBOSITY -lt 2 ] && VERBOSITY=2 [ -n "$g_debugging" ] && set -x [ $# -eq 0 ] || usage 1 @@ -1390,11 +1390,11 @@ logwatch_command() { while [ -n "$option" ]; do case $option in v*) - VERBOSE=$(($VERBOSE + 1 )) + VERBOSITY=$(($VERBOSITY + 1 )) option=${option#v} ;; q*) - VERBOSE=$(($VERBOSE - 1 )) + VERBOSITY=$(($VERBOSITY - 1 )) option=${option#q} ;; m*) diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 29188f5a5..81eef667a 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -297,6 +297,7 @@ None. RING_BELL TEST USE_VERBOSITY + VERBOSE VERBOSE_OFFSET See Migration Issue 14 above for additional information. diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 6e9da27eb..efaa7844b 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -259,15 +259,15 @@ get_config() { ;; esac - [ -n "$g_use_verbosity" ] && VERBOSE=$g_use_verbosity || VERBOSE=$(($g_verbose_offset + $VERBOSITY)) + [ -n "$g_use_verbosity" ] && VERBOSITY=$g_use_verbosity || VERBOSITY=$(($g_verbose_offset + $VERBOSITY)) - if [ $VERBOSE -lt -1 ]; then - VERBOSE=-1 - elif [ $VERBOSE -gt 2 ]; then - VERBOSE=2 + if [ $VERBOSITY -lt -1 ]; then + VERBOSITY=-1 + elif [ $VERBOSITY -gt 2 ]; then + VERBOSITY=2 fi - export VERBOSE + export VERBOSITY [ -n "${HOSTNAME:=$(hostname)}" ] @@ -355,7 +355,7 @@ compiler() { [ "$1" = nolock ] && shift; shift - options="--verbose=$VERBOSE" + options="--verbose=$VERBOSITY" [ -n "$STARTUP_LOG" ] && options="$options --log=$STARTUP_LOG" [ -n "$LOG_VERBOSITY" ] && options="$options --log_verbosity=$LOG_VERBOSITY"; [ -n "$g_export" ] && options="$options --export" diff --git a/Shorewall6-lite/shorecap b/Shorewall6-lite/shorecap index a1cc68745..a06d5c0bf 100755 --- a/Shorewall6-lite/shorecap +++ b/Shorewall6-lite/shorecap @@ -59,7 +59,7 @@ VERSION=$(cat /usr/share/shorewall6-lite/version) [ -n "$IPTABLES" ] || IPTABLES=$(mywhich iptables) -VERBOSE=0 +VERBOSITY=0 load_kernel_modules No determine_capabilities report_capabilities1 diff --git a/Shorewall6-lite/shorewall6-lite b/Shorewall6-lite/shorewall6-lite index fecfc6c2e..f18010e9f 100755 --- a/Shorewall6-lite/shorewall6-lite +++ b/Shorewall6-lite/shorewall6-lite @@ -149,9 +149,9 @@ get_config() { [ -n "${VERBOSITY:=2}" ] - [ -n "$g_use_verbosity" ] && VERBOSE=$g_use_verbosity || VERBOSE=$(($g_verbose_offset + $VERBOSITY)) + [ -n "$g_use_verbosity" ] && VERBOSITY=$g_use_verbosity || VERBOSITY=$(($g_verbose_offset + $VERBOSITY)) - export VERBOSE + export VERBOSITY [ -n "${HOSTNAME:=$(hostname)}" ] diff --git a/Shorewall6/lib.base b/Shorewall6/lib.base index 592755e68..c9687f42e 100644 --- a/Shorewall6/lib.base +++ b/Shorewall6/lib.base @@ -56,7 +56,7 @@ progress_message() # $* = Message local timestamp timestamp= - if [ $VERBOSE -gt 1 ]; then + if [ $VERBOSITY -gt 1 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi @@ -67,7 +67,7 @@ progress_message2() # $* = Message local timestamp timestamp= - if [ $VERBOSE -gt 0 ]; then + if [ $VERBOSITY -gt 0 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi @@ -78,7 +78,7 @@ progress_message3() # $* = Message local timestamp timestamp= - if [ $VERBOSE -ge 0 ]; then + if [ $VERBOSITY -ge 0 ]; then [ -n "$TIMESTAMP" ] && timestamp="$(date +%H:%M:%S) " echo "${timestamp}$@" fi @@ -897,7 +897,7 @@ report_capabilities() { echo " " $1: $setting } - if [ $VERBOSE -gt 1 ]; then + if [ $VERBOSITY -gt 1 ]; then echo "Shorewall6 has detected the following ip6tables/netfilter capabilities:" report_capability "Packet Mangling" $MANGLE_ENABLED report_capability "Multi-port Match" $MULTIPORT diff --git a/Shorewall6/lib.cli b/Shorewall6/lib.cli index 138146ed8..b5d4f34d4 100644 --- a/Shorewall6/lib.cli +++ b/Shorewall6/lib.cli @@ -132,7 +132,7 @@ syslog_circular_buffer() { # packet_log() # $1 = number of messages { - if [ -n "$g_showmacs" -o $VERBOSE -gt 2 ]; then + if [ -n "$g_showmacs" -o $VERBOSITY -gt 2 ]; then $g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | head -n$1 | tac | sed 's/ kernel://; s/\[.*\] //' | sed s/" $host $LOGFORMAT"/" "/ else $g_logread | grep 'IN=.* OUT=.*SRC=.*:.*DST=' | head -n$1 | tac | sed 's/ kernel://; s/MAC=.* SRC=/SRC=/; s/\[.*\] '// | sed s/" $host $LOGFORMAT"/" "/ @@ -371,7 +371,7 @@ show_command() { option= ;; v*) - VERBOSE=$(($VERBOSE + 1 )) + VERBOSITY=$(($VERBOSITY + 1 )) option=${option#v} ;; x*) @@ -492,7 +492,7 @@ show_command() { capabilities) [ $# -gt 1 ] && usage 1 determine_capabilities - VERBOSE=2 + VERBOSITY=2 if [ -n "$g_filemode" ]; then report_capabilities1 else @@ -654,7 +654,7 @@ dump_command() { g_ipt_options="$g_ipt_options $g_ipt_options1" - [ $VERBOSE -lt 2 ] && VERBOSE=2 + [ $VERBOSITY -lt 2 ] && VERBOSITY=2 [ -n "$g_debugging" ] && set -x [ $# -eq 0 ] || usage 1 @@ -1088,11 +1088,11 @@ logwatch_command() { while [ -n "$option" ]; do case $option in v*) - VERBOSE=$(($VERBOSE + 1 )) + VERBOSITY=$(($VERBOSITY + 1 )) option=${option#v} ;; q*) - VERBOSE=$(($VERBOSE - 1 )) + VERBOSITY=$(($VERBOSITY - 1 )) option=${option#q} ;; m*) diff --git a/Shorewall6/shorewall6 b/Shorewall6/shorewall6 index 3bb58c9d8..6974f551f 100755 --- a/Shorewall6/shorewall6 +++ b/Shorewall6/shorewall6 @@ -178,15 +178,15 @@ get_config() { ;; esac - [ -n "$g_use_verbosity" ] && VERBOSE=$g_use_verbosity || VERBOSE=$(($g_verbose_offset + $VERBOSITY)) + [ -n "$g_use_verbosity" ] && VERBOSITY=$g_use_verbosity || VERBOSITY=$(($g_verbose_offset + $VERBOSITY)) - if [ $VERBOSE -lt -1 ]; then - VERBOSE=-1 - elif [ $VERBOSE -gt 2 ]; then - VERBOSE=2 + if [ $VERBOSITY -lt -1 ]; then + VERBOSITY=-1 + elif [ $VERBOSITY -gt 2 ]; then + VERBOSITY=2 fi - export VERBOSE + export VERBOSITY [ -n "${HOSTNAME:=$(hostname)}" ] @@ -285,7 +285,7 @@ compiler() { [ "$1" = nolock ] && shift; shift - options="--verbose=$VERBOSE --family=6" + options="--verbose=$VERBOSITY --family=6" [ -n "$STARTUP_LOG" ] && options="$options --log=$STARTUP_LOG" [ -n "$LOG_VERBOSITY" ] && options="$options --log_verbosity=$LOG_VERBOSITY"; [ -n "$g_export" ] && options="$options --export" diff --git a/docs/configuration_file_basics.xml b/docs/configuration_file_basics.xml index 1a4f8daa1..cab390611 100644 --- a/docs/configuration_file_basics.xml +++ b/docs/configuration_file_basics.xml @@ -666,7 +666,7 @@ SHELL cat /etc/shorewall/rules.d/*.rules VARDIR - VERBOSE + VERBOSE VERBOSE_OFFSET diff --git a/manpages/shorewall-params.xml b/manpages/shorewall-params.xml index c1277ef15..61c685ec6 100644 --- a/manpages/shorewall-params.xml +++ b/manpages/shorewall-params.xml @@ -83,7 +83,7 @@ VARDIR - VERBOSE + VERBOSE VERBOSE_OFFSET diff --git a/manpages6/shorewall6-params.xml b/manpages6/shorewall6-params.xml index 1db6a2144..8a0f0119b 100644 --- a/manpages6/shorewall6-params.xml +++ b/manpages6/shorewall6-params.xml @@ -84,7 +84,7 @@ VARDIR - VERBOSE + VERBOSE VERBOSE_OFFSET