forked from extern/shorewall_code
Add STARTOPTIONS and RESTARTOPTIONS
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
58bf562747
commit
41e68b59dc
@ -16,11 +16,23 @@ startup=0
|
|||||||
# wait_interface=
|
# wait_interface=
|
||||||
|
|
||||||
#
|
#
|
||||||
# Startup options
|
# Global start/restart/stop options
|
||||||
#
|
#
|
||||||
|
|
||||||
OPTIONS=""
|
OPTIONS=""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Start options
|
||||||
|
#
|
||||||
|
|
||||||
|
STARTOPTIONS=""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Restart options
|
||||||
|
#
|
||||||
|
|
||||||
|
RESTARTOPTIONS=""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Init Log -- if /dev/null, use the STARTUP_LOG defined in shorewall.conf
|
# Init Log -- if /dev/null, use the STARTUP_LOG defined in shorewall.conf
|
||||||
#
|
#
|
||||||
|
@ -86,7 +86,7 @@ wait_for_pppd () {
|
|||||||
shorewall_start () {
|
shorewall_start () {
|
||||||
echo -n "Starting \"Shorewall firewall\": "
|
echo -n "Starting \"Shorewall firewall\": "
|
||||||
wait_for_pppd
|
wait_for_pppd
|
||||||
$SRWL $SRWL_OPTS start >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS start $STARTOPTIONS >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ shorewall_stop () {
|
|||||||
# restart the firewall
|
# restart the firewall
|
||||||
shorewall_restart () {
|
shorewall_restart () {
|
||||||
echo -n "Restarting \"Shorewall firewall\": "
|
echo -n "Restarting \"Shorewall firewall\": "
|
||||||
$SRWL $SRWL_OPTS restart >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS restart $RESTARTOPTIONS >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,17 +74,17 @@ export SHOREWALL_INIT_SCRIPT=1
|
|||||||
# E X E C U T I O N B E G I N S H E R E #
|
# E X E C U T I O N B E G I N S H E R E #
|
||||||
################################################################################
|
################################################################################
|
||||||
command="$1"
|
command="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
case "$command" in
|
case "$command" in
|
||||||
start|restart|stop)
|
start)
|
||||||
exec /sbin/shorewall $OPTIONS $@
|
exec /sbin/shorewall $OPTIONS start $STARTOPTIONS $@
|
||||||
;;
|
;;
|
||||||
stop|restart|status)
|
restart|reload)
|
||||||
exec /sbin/shorewall $@
|
exec /sbin/shorewall @OPTIONS restart $RESTARTOPTIONS $@
|
||||||
;;
|
;;
|
||||||
reload)
|
status|stop)
|
||||||
shift
|
exec /sbin/shorewall @OPTIONS $command $@
|
||||||
exec /sbin/shorewall $OPTIONS restart $@
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
|
Loading…
Reference in New Issue
Block a user