diff --git a/Shorewall/default.debian b/Shorewall/default.debian index 867221952..f8a721993 100644 --- a/Shorewall/default.debian +++ b/Shorewall/default.debian @@ -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 # diff --git a/Shorewall/init.debian.sh b/Shorewall/init.debian.sh index 89cae5d17..53b099139 100755 --- a/Shorewall/init.debian.sh +++ b/Shorewall/init.debian.sh @@ -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 } diff --git a/Shorewall/init.sh b/Shorewall/init.sh index 2a4010535..3a579a66d 100755 --- a/Shorewall/init.sh +++ b/Shorewall/init.sh @@ -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