Clean up -q implementation

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1284 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2004-04-22 20:57:36 +00:00
parent d5a3e8ebeb
commit c446fb3735
3 changed files with 46 additions and 31 deletions

View File

@ -53,7 +53,7 @@ my_mutex_off() {
progress_message() # $* = Message progress_message() # $* = Message
{ {
[ -n "$QUIET" ] || echo $@ [ -n "$QUIET" ] || echo "$@"
} }
# #

View File

@ -92,9 +92,9 @@ New Features:
7) A new "-q" option has been added to /sbin/shorewall commands. It 7) A new "-q" option has been added to /sbin/shorewall commands. It
causes the start, restart, check and refresh commands to produce causes the start, restart, check and refresh commands to produce
much less output so that warning messages are more visible. When much less output so that warning messages are more visible (when
testing this change, I discovered a bug where a bogus warning testing this change, I discovered a bug where a bogus warning
message was being generated :-) message was being generated).

View File

@ -592,8 +592,16 @@ done=0
while [ $done -eq 0 ]; do while [ $done -eq 0 ]; do
[ $# -eq 0 ] && usage 1 [ $# -eq 0 ] && usage 1
case $1 in option=$1
-c) case $option in
-*)
option=${option#-}
[ "x$option" = x ] && usage 1
while [ "x$option" != x ]; do
case $option in
c)
[ $# -eq 1 ] && usage 1 [ $# -eq 1 ] && usage 1
if [ ! -d $2 ]; then if [ ! -d $2 ]; then
@ -605,15 +613,22 @@ while [ $done -eq 0 ]; do
fi fi
SHOREWALL_DIR=$2 SHOREWALL_DIR=$2
shift option=
shift shift
;; ;;
-x) x*)
IPT_OPTIONS="-xnv" IPT_OPTIONS="-xnv"
shift option=${option#x}
;; ;;
-q) q*)
QUIET=Yes QUIET=Yes
option=${option#q}
;;
*)
usage 1
;;
esac
done
shift shift
;; ;;
*) *)