forked from extern/shorewall_code
Clamp VERBOSITY to valid range
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
50f06ff80e
commit
2c10d4b8f9
@ -145,6 +145,12 @@ get_config() {
|
|||||||
|
|
||||||
[ -n "$g_use_verbosity" ] && VERBOSITY=$g_use_verbosity || VERBOSITY=$(($g_verbose_offset + $VERBOSITY))
|
[ -n "$g_use_verbosity" ] && VERBOSITY=$g_use_verbosity || VERBOSITY=$(($g_verbose_offset + $VERBOSITY))
|
||||||
|
|
||||||
|
if [ $VERBOSITY -lt -1 ]; then
|
||||||
|
VERBOSITY=-1
|
||||||
|
elif [ $VERBOSITY -gt 2 ]; then
|
||||||
|
VERBOSITY=2
|
||||||
|
fi
|
||||||
|
|
||||||
g_hostname=$(hostname 2> /dev/null)
|
g_hostname=$(hostname 2> /dev/null)
|
||||||
|
|
||||||
IP=$(mywhich ip 2> /dev/null)
|
IP=$(mywhich ip 2> /dev/null)
|
||||||
|
@ -145,6 +145,12 @@ get_config() {
|
|||||||
|
|
||||||
[ -n "$g_use_verbosity" ] && VERBOSITY=$g_use_verbosity || VERBOSITY=$(($g_verbose_offset + $VERBOSITY))
|
[ -n "$g_use_verbosity" ] && VERBOSITY=$g_use_verbosity || VERBOSITY=$(($g_verbose_offset + $VERBOSITY))
|
||||||
|
|
||||||
|
if [ $VERBOSITY -lt -1 ]; then
|
||||||
|
VERBOSITY=-1
|
||||||
|
elif [ $VERBOSITY -gt 2 ]; then
|
||||||
|
VERBOSITY=2
|
||||||
|
fi
|
||||||
|
|
||||||
g_hostname=$(hostname 2> /dev/null)
|
g_hostname=$(hostname 2> /dev/null)
|
||||||
|
|
||||||
IP=$(mywhich ip 2> /dev/null)
|
IP=$(mywhich ip 2> /dev/null)
|
||||||
|
Loading…
Reference in New Issue
Block a user