Correct locking on 'reload'

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3299 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-01-16 16:45:25 +00:00
parent 14cd6a770b
commit 27e36c171f
2 changed files with 6 additions and 10 deletions

View File

@ -47,14 +47,6 @@
# the corresponding function in that file if the user did
# not specify "nolock" on the runline.
#
my_mutex_on() {
[ -n "$nolock" ] || { mutex_on; HAVE_MUTEX=Yes; }
}
my_mutex_off() {
[ -n "$HAVE_MUTEX" ] && { mutex_off; HAVE_MUTEX=; }
}
#
# Fatal error -- stops the firewall after issuing the error message
#
@ -9209,7 +9201,7 @@ stop_firewall()
set_state "Unknown"
fi
elif [ -x /sbin/shorewall ]; then
/sbin/shorewall stop
/sbin/shorewall nolock stop
fi
kill \$\$

View File

@ -966,9 +966,13 @@ case "$1" in
export NOROUTES
[ -n "$nolock" ] || mutex_on
if $SHOREWALL_SHELL $FIREWALL $debugging $nolock compile /var/lib/shorewall/.reload; then
$0 $(make_quiet) restore .reload
$0 $(make_quiet) restore nolock .reload
fi
[ -n "$nolock" ] || mutex_off
;;
add|delete)
[ $# -lt 3 ] && usage 1