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=
|
||||
|
||||
#
|
||||
# Startup options
|
||||
# Global start/restart/stop options
|
||||
#
|
||||
|
||||
OPTIONS=""
|
||||
|
||||
#
|
||||
# Start options
|
||||
#
|
||||
|
||||
STARTOPTIONS=""
|
||||
|
||||
#
|
||||
# Restart options
|
||||
#
|
||||
|
||||
RESTARTOPTIONS=""
|
||||
|
||||
#
|
||||
# Init Log -- if /dev/null, use the STARTUP_LOG defined in shorewall.conf
|
||||
#
|
||||
|
@ -86,7 +86,7 @@ wait_for_pppd () {
|
||||
shorewall_start () {
|
||||
echo -n "Starting \"Shorewall firewall\": "
|
||||
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
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ shorewall_stop () {
|
||||
# restart the firewall
|
||||
shorewall_restart () {
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -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 #
|
||||
################################################################################
|
||||
command="$1"
|
||||
shift
|
||||
|
||||
case "$command" in
|
||||
start|restart|stop)
|
||||
exec /sbin/shorewall $OPTIONS $@
|
||||
start)
|
||||
exec /sbin/shorewall $OPTIONS start $STARTOPTIONS $@
|
||||
;;
|
||||
stop|restart|status)
|
||||
exec /sbin/shorewall $@
|
||||
restart|reload)
|
||||
exec /sbin/shorewall @OPTIONS restart $RESTARTOPTIONS $@
|
||||
;;
|
||||
reload)
|
||||
shift
|
||||
exec /sbin/shorewall $OPTIONS restart $@
|
||||
status|stop)
|
||||
exec /sbin/shorewall @OPTIONS $command $@
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
|
Loading…
Reference in New Issue
Block a user