mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-18 18:51:00 +01:00
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:
parent
d5a3e8ebeb
commit
c446fb3735
@ -53,7 +53,7 @@ my_mutex_off() {
|
|||||||
|
|
||||||
progress_message() # $* = Message
|
progress_message() # $* = Message
|
||||||
{
|
{
|
||||||
[ -n "$QUIET" ] || echo $@
|
[ -n "$QUIET" ] || echo "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -17,9 +17,9 @@ Issues when migrating from Shorewall 2.0.0 to Shorewall 2.0.1:
|
|||||||
|
|
||||||
1) Dynamic Zone support.
|
1) Dynamic Zone support.
|
||||||
|
|
||||||
If you don't need to use the "shorewall add" and "shorewall delete"
|
If you don't need to use the "shorewall add" and "shorewall delete"
|
||||||
commands, you should set DYNAMIC_ZONES=No in
|
commands, you should set DYNAMIC_ZONES=No in
|
||||||
/etc/shorewall/shorewall.conf .
|
/etc/shorewall/shorewall.conf.
|
||||||
|
|
||||||
New Features:
|
New Features:
|
||||||
|
|
||||||
@ -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).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -592,33 +592,48 @@ 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
|
||||||
[ $# -eq 1 ] && usage 1
|
-*)
|
||||||
|
option=${option#-}
|
||||||
|
|
||||||
if [ ! -d $2 ]; then
|
[ "x$option" = x ] && usage 1
|
||||||
if [ -e $2 ]; then
|
|
||||||
echo "$2 is not a directory" >&2 && exit 2
|
while [ "x$option" != x ]; do
|
||||||
else
|
case $option in
|
||||||
echo "Directory $2 does not exist" >&2 && exit 2
|
c)
|
||||||
fi
|
[ $# -eq 1 ] && usage 1
|
||||||
fi
|
|
||||||
|
|
||||||
SHOREWALL_DIR=$2
|
if [ ! -d $2 ]; then
|
||||||
shift
|
if [ -e $2 ]; then
|
||||||
shift
|
echo "$2 is not a directory" >&2 && exit 2
|
||||||
;;
|
else
|
||||||
-x)
|
echo "Directory $2 does not exist" >&2 && exit 2
|
||||||
IPT_OPTIONS="-xnv"
|
fi
|
||||||
shift
|
fi
|
||||||
;;
|
|
||||||
-q)
|
SHOREWALL_DIR=$2
|
||||||
QUIET=Yes
|
option=
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
x*)
|
||||||
done=1
|
IPT_OPTIONS="-xnv"
|
||||||
;;
|
option=${option#x}
|
||||||
|
;;
|
||||||
|
q*)
|
||||||
|
QUIET=Yes
|
||||||
|
option=${option#q}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
done=1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user