A couple of minor tweaks

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3306 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-01-17 17:00:54 +00:00
parent 49fbc960c0
commit 8cc91bf428
2 changed files with 16 additions and 7 deletions

View File

@ -63,6 +63,7 @@ fatal_error() # $* = Error Message
echo " ERROR: $@" >&2 echo " ERROR: $@" >&2
if [ $COMMAND = check -o $COMMAND = compile ]; then if [ $COMMAND = check -o $COMMAND = compile ]; then
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR [ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
[ -n "$RESTOREBASE" ] && rm -f $RESTOREBASE
else else
stop_firewall stop_firewall
fi fi
@ -9958,7 +9959,7 @@ do_initialize() {
[ -n "$TMP_DIR" ] && chmod 700 $TMP_DIR || \ [ -n "$TMP_DIR" ] && chmod 700 $TMP_DIR || \
startup_error "Can't create a temporary directory" startup_error "Can't create a temporary directory"
trap "rm -rf $TMP_DIR; my_mutex_off; exit 2" 1 2 3 4 5 6 9 trap "[ -n "$RESTOREBASE" ] && rm -f $RESTOREBASE;rm -rf $TMP_DIR; my_mutex_off; exit 2" 1 2 3 4 5 6 9
ensure_config_path ensure_config_path

View File

@ -629,9 +629,9 @@ NOROUTES=
EXPORT= EXPORT=
noroutes= noroutes=
done=0 finished=0
while [ $done -eq 0 ]; do while [ $finished -eq 0 ]; do
[ $# -eq 0 ] && usage 1 [ $# -eq 0 ] && usage 1
option=$1 option=$1
case $option in case $option in
@ -681,6 +681,10 @@ while [ $done -eq 0 ]; do
NOROUTES=Yes NOROUTES=Yes
option=${option#n} option=${option#n}
;; ;;
-)
finished=1
option=
;;
*) *)
usage 1 usage 1
;; ;;
@ -689,7 +693,7 @@ while [ $done -eq 0 ]; do
shift shift
;; ;;
*) *)
done=1 finished=1
;; ;;
esac esac
done done
@ -846,9 +850,9 @@ case "$1" in
compile|generate) compile|generate)
shift shift
done=0 finished=0
while [ $done -eq 0 ]; do while [ $finished -eq 0 ]; do
[ $# -eq 0 ] && usage 1 [ $# -eq 0 ] && usage 1
option=$1 option=$1
case $option in case $option in
@ -871,6 +875,10 @@ case "$1" in
export PROGRAM=Yes export PROGRAM=Yes
option=${option#p} option=${option#p}
;; ;;
-)
finished=1
option=
;;
*) *)
usage 1 usage 1
;; ;;
@ -879,7 +887,7 @@ case "$1" in
shift shift
;; ;;
*) *)
done=1 finished=1
;; ;;
esac esac
done done