mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-25 09:03:30 +01:00
Clamp VERBOSITY to valid range
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
38ea8159d4
commit
87dbf42bad
@ -145,6 +145,12 @@ get_config() {
|
||||
|
||||
[ -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)
|
||||
|
||||
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))
|
||||
|
||||
if [ $VERBOSITY -lt -1 ]; then
|
||||
VERBOSITY=-1
|
||||
elif [ $VERBOSITY -gt 2 ]; then
|
||||
VERBOSITY=2
|
||||
fi
|
||||
|
||||
g_hostname=$(hostname 2> /dev/null)
|
||||
|
||||
IP=$(mywhich ip 2> /dev/null)
|
||||
|
Loading…
Reference in New Issue
Block a user