mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-18 11:38:14 +01:00
Add SAFESTOP setting to /etc/default/shorewall*.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
b972de959e
commit
3db31f2f65
@ -26,4 +26,11 @@ OPTIONS=""
|
|||||||
#
|
#
|
||||||
INITLOG=/dev/null
|
INITLOG=/dev/null
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set this to 1 to cause '/etc/init.d/shorewall-lite stop' to place the firewall in
|
||||||
|
# a safe state rather than to open it
|
||||||
|
#
|
||||||
|
|
||||||
|
SAFESTOP=0
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
@ -88,7 +88,11 @@ shorewall_start () {
|
|||||||
# stop the firewall
|
# stop the firewall
|
||||||
shorewall_stop () {
|
shorewall_stop () {
|
||||||
echo -n "Stopping \"Shorewall firewall\": "
|
echo -n "Stopping \"Shorewall firewall\": "
|
||||||
|
if [ "$SAFESTOP" = 1 ]; then
|
||||||
|
$SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
|
else
|
||||||
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,4 +26,11 @@ OPTIONS=""
|
|||||||
#
|
#
|
||||||
INITLOG=/dev/null
|
INITLOG=/dev/null
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set this to 1 to cause '/etc/init.d/shorewall stop' to place the firewall in
|
||||||
|
# a safe state rather than to open it
|
||||||
|
#
|
||||||
|
|
||||||
|
SAFESTOP=0
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
@ -93,7 +93,11 @@ shorewall_start () {
|
|||||||
# stop the firewall
|
# stop the firewall
|
||||||
shorewall_stop () {
|
shorewall_stop () {
|
||||||
echo -n "Stopping \"Shorewall firewall\": "
|
echo -n "Stopping \"Shorewall firewall\": "
|
||||||
|
if [ "$SAFESTOP" = 1 ]; then
|
||||||
|
$SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
|
else
|
||||||
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,6 +358,13 @@ None.
|
|||||||
Shorewall-init may be installed on Debian-based systems, SuSE-based
|
Shorewall-init may be installed on Debian-based systems, SuSE-based
|
||||||
systems and RedHat-based systems.
|
systems and RedHat-based systems.
|
||||||
|
|
||||||
|
On Debian-based systems, during system shutdown the firewall is
|
||||||
|
opened prior to network shutdown (/etc/init.d/shorewall stop
|
||||||
|
performs a 'clear' operation rather than a 'stop'). This is
|
||||||
|
required by Debian standards. You can change this default behavior
|
||||||
|
by setting SAFESTOP=1 in /etc/default/shorewall
|
||||||
|
(/etc/default/shorewall6, ...).
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
V I. P R O B L E M S C O R R E C T E D A N D N E W F E A T U R E S
|
V I. P R O B L E M S C O R R E C T E D A N D N E W F E A T U R E S
|
||||||
I N P R I O R R E L E A S E S
|
I N P R I O R R E L E A S E S
|
||||||
|
@ -26,4 +26,11 @@ OPTIONS=""
|
|||||||
#
|
#
|
||||||
INITLOG=/dev/null
|
INITLOG=/dev/null
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set this to 1 to cause '/etc/init.d/shorewall6-lite stop' to place the firewall in
|
||||||
|
# a safe state rather than to open it
|
||||||
|
#
|
||||||
|
|
||||||
|
SAFESTOP=0
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
@ -88,7 +88,11 @@ shorewall6_start () {
|
|||||||
# stop the firewall
|
# stop the firewall
|
||||||
shorewall6_stop () {
|
shorewall6_stop () {
|
||||||
echo -n "Stopping \"Shorewall6 Lite firewall\": "
|
echo -n "Stopping \"Shorewall6 Lite firewall\": "
|
||||||
|
if [ "$SAFESTOP" = 1 ]; then
|
||||||
|
$SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
|
else
|
||||||
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,4 +21,16 @@ startup=0
|
|||||||
|
|
||||||
OPTIONS=""
|
OPTIONS=""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Init Log -- if /dev/null, use the STARTUP_LOG defined in shorewall.conf
|
||||||
|
#
|
||||||
|
INITLOG=/dev/null
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set this to 1 to cause '/etc/init.d/shorewall6 stop' to place the firewall in
|
||||||
|
# a safe state rather than to open it
|
||||||
|
#
|
||||||
|
|
||||||
|
SAFESTOP=0
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
@ -93,7 +93,11 @@ shorewall6_start () {
|
|||||||
# stop the firewall
|
# stop the firewall
|
||||||
shorewall6_stop () {
|
shorewall6_stop () {
|
||||||
echo -n "Stopping \"Shorewall6 firewall\": "
|
echo -n "Stopping \"Shorewall6 firewall\": "
|
||||||
|
if [ "$SAFESTOP" = 1 ]; then
|
||||||
|
$SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
|
else
|
||||||
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user