mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-09 01:04:06 +01:00
De-implement 'close'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
749d6be64e
commit
4f428d8135
@ -2240,7 +2240,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
case $COMMAND in
|
case $COMMAND in
|
||||||
stop|close|clear|restore)
|
stop|clear|restore)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
set +x
|
set +x
|
||||||
@ -2446,18 +2446,12 @@ EOF
|
|||||||
|
|
||||||
emit '
|
emit '
|
||||||
|
|
||||||
if [ "$COMMAND" != close ]; then
|
set_state "Stopped"
|
||||||
set_state "Stopped"
|
logger -p kern.info "$g_product Stopped"
|
||||||
logger -p kern.info "$g_product Stopped"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $COMMAND in
|
case $COMMAND in
|
||||||
stop|clear)
|
stop|clear)
|
||||||
;;
|
;;
|
||||||
close)
|
|
||||||
set_state "Closed"
|
|
||||||
logger -p kern.info "$g_product Closed"
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
#
|
#
|
||||||
# The firewall is being stopped when we were trying to do something
|
# The firewall is being stopped when we were trying to do something
|
||||||
|
@ -1249,7 +1249,7 @@ sub compile_updown() {
|
|||||||
' state=started',
|
' state=started',
|
||||||
'elif [ -f ${VARDIR}/state ]; then',
|
'elif [ -f ${VARDIR}/state ]; then',
|
||||||
' case "$(cat ${VARDIR}/state)" in',
|
' case "$(cat ${VARDIR}/state)" in',
|
||||||
' Stopped*|Closed*)',
|
' Stopped*)',
|
||||||
' state=stopped',
|
' state=stopped',
|
||||||
' ;;',
|
' ;;',
|
||||||
' Cleared*)',
|
' Cleared*)',
|
||||||
@ -1294,7 +1294,7 @@ sub compile_updown() {
|
|||||||
' detect_configuration',
|
' detect_configuration',
|
||||||
' define_firewall',
|
' define_firewall',
|
||||||
' else',
|
' else',
|
||||||
' COMMAND=close',
|
' COMMAND=stop',
|
||||||
' detect_configuration',
|
' detect_configuration',
|
||||||
' stop_firewall',
|
' stop_firewall',
|
||||||
' fi',
|
' fi',
|
||||||
@ -1331,7 +1331,7 @@ sub compile_updown() {
|
|||||||
' define_firewall',
|
' define_firewall',
|
||||||
' ;;',
|
' ;;',
|
||||||
' cleared|unknown)',
|
' cleared|unknown)',
|
||||||
' COMMAND=close',
|
' COMMAND=stop',
|
||||||
' detect_configuration',
|
' detect_configuration',
|
||||||
' stop_firewall',
|
' stop_firewall',
|
||||||
' ;;',
|
' ;;',
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# Give Usage Information
|
# Give Usage Information
|
||||||
#
|
#
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 [ options ] [ start|stop|close|clear|down|reset|refresh|restart|status|up|version ]"
|
echo "Usage: $0 [ options ] [ start|stop|clear|down|reset|refresh|restart|status|up|version ]"
|
||||||
echo
|
echo
|
||||||
echo "Options are:"
|
echo "Options are:"
|
||||||
echo
|
echo
|
||||||
@ -182,15 +182,6 @@ case "$COMMAND" in
|
|||||||
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
|
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
|
||||||
progress_message3 "done."
|
progress_message3 "done."
|
||||||
;;
|
;;
|
||||||
close)
|
|
||||||
[ $# -ne 1 ] && usage 2
|
|
||||||
progress_message3 "Closing $g_product...."
|
|
||||||
detect_configuration
|
|
||||||
stop_firewall
|
|
||||||
status=0
|
|
||||||
[ -n "$SUBSYSLOCK" ] && touch ${SUBSYSLOCK}-prenet
|
|
||||||
progress_message3 "done."
|
|
||||||
;;
|
|
||||||
reset)
|
reset)
|
||||||
if ! shorewall_is_started ; then
|
if ! shorewall_is_started ; then
|
||||||
error_message "$g_product is not running"
|
error_message "$g_product is not running"
|
||||||
@ -285,7 +276,7 @@ case "$COMMAND" in
|
|||||||
if [ -f ${VARDIR}/state ]; then
|
if [ -f ${VARDIR}/state ]; then
|
||||||
state="$(cat ${VARDIR}/state)"
|
state="$(cat ${VARDIR}/state)"
|
||||||
case $state in
|
case $state in
|
||||||
Stopped*|Closed*|lClear*)
|
Stopped*|lClear*)
|
||||||
status=3
|
status=3
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# Give Usage Information
|
# Give Usage Information
|
||||||
#
|
#
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 [ options ] [ start|stop|close|clear|down|reset|refresh|restart|status|up|version ]"
|
echo "Usage: $0 [ options ] [ start|stop|clear|down|reset|refresh|restart|status|up|version ]"
|
||||||
echo
|
echo
|
||||||
echo "Options are:"
|
echo "Options are:"
|
||||||
echo
|
echo
|
||||||
@ -184,15 +184,6 @@ else
|
|||||||
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
|
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
|
||||||
progress_message3 "done."
|
progress_message3 "done."
|
||||||
;;
|
;;
|
||||||
close)
|
|
||||||
[ $# -ne 1 ] && usage 2
|
|
||||||
progress_message3 "Closing $g_product...."
|
|
||||||
detect_configuration
|
|
||||||
stop_firewall
|
|
||||||
status=0
|
|
||||||
[ -n "$SUBSYSLOCK" ] && touch ${SUBSYSLOCK}-prenet
|
|
||||||
progress_message3 "done."
|
|
||||||
;;
|
|
||||||
reset)
|
reset)
|
||||||
if ! shorewall6_is_started ; then
|
if ! shorewall6_is_started ; then
|
||||||
error_message "$g_product is not running"
|
error_message "$g_product is not running"
|
||||||
@ -286,7 +277,7 @@ else
|
|||||||
if [ -f ${VARDIR}/state ]; then
|
if [ -f ${VARDIR}/state ]; then
|
||||||
state="$(cat ${VARDIR}/state)"
|
state="$(cat ${VARDIR}/state)"
|
||||||
case $state in
|
case $state in
|
||||||
Stopped*|Closed*|Clear*)
|
Stopped*|Clear*)
|
||||||
status=3
|
status=3
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user