From fb55d63eaf533663c7f4711ad34e53f68dfe2750 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 28 Feb 2010 16:42:50 -0800 Subject: [PATCH] Allow verbosity to be separate from -V Signed-off-by: Tom Eastep --- Shorewall/Perl/prog.footer | 10 ++++++++-- Shorewall/Perl/prog.footer6 | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/prog.footer b/Shorewall/Perl/prog.footer index 8bd2dd11d..1b5684eee 100644 --- a/Shorewall/Perl/prog.footer +++ b/Shorewall/Perl/prog.footer @@ -72,6 +72,12 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do ;; V*) option=${option#V} + + if [ -z "$option" -a $# -gt 0 ]; then + shift + option=$1 + fi + if [ -n "$option" ]; then case $option in -1|0|1|2) @@ -79,11 +85,11 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do option= ;; *) - startup_error "Invalid -V option ($option)" + startup_error "Invalid -V option value ($option)" ;; esac else - startup_error "Missing -V option" + startup_error "Missing -V option value" fi ;; *) diff --git a/Shorewall/Perl/prog.footer6 b/Shorewall/Perl/prog.footer6 index d2e79b25c..6e28596ed 100644 --- a/Shorewall/Perl/prog.footer6 +++ b/Shorewall/Perl/prog.footer6 @@ -72,6 +72,12 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do ;; V*) option=${option#V} + + if [ -z "$option" -a $# -gt 0 ]; then + shift + option=$1 + fi + if [ -n "$option" ]; then case $option in -1|0|1|2) @@ -79,11 +85,11 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do option= ;; *) - startup_error "Invalid -V option ($option)" + startup_error "Invalid -V option value ($option)" ;; esac else - startup_error "Missing -V option" + startup_error "Missing -V option value" fi ;; esac