From e842bc2190e141c1e756f6d3d851e54c51a5fe77 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 7 Dec 2005 22:03:44 +0000 Subject: [PATCH] Add 'reload' command to init scripts git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3130 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/changelog.txt | 2 ++ Shorewall/init.archlinux.sh | 6 +++--- Shorewall/init.sh | 13 ++++++------- Shorewall/releasenotes.txt | 3 +++ Shorewall/shorewall | 3 --- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index de0aae243..c365ad4c9 100755 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -20,6 +20,8 @@ Changes in 3.0.3 10) Implement 'ipdecimal' command. +11) Implement 'reload' in the init script. + Changes in 3.0.2 1) Typos in the Samples corrected. diff --git a/Shorewall/init.archlinux.sh b/Shorewall/init.archlinux.sh index addcce11d..91040787c 100644 --- a/Shorewall/init.archlinux.sh +++ b/Shorewall/init.archlinux.sh @@ -28,7 +28,7 @@ case "$1" in stat_done fi ;; - + stop) stat_busy "Stopping $DAEMON_NAME" @@ -41,7 +41,7 @@ case "$1" in fi ;; - restart) + restart|reload) stat_busy "Restarting $DAEMON_NAME" /sbin/shorewall restart &>/dev/null if [ $? -gt 0 ]; then @@ -52,7 +52,7 @@ case "$1" in ;; *) - echo "usage: $0 {start|stop|restart}" + echo "usage: $0 {start|stop|restart}" esac exit 0 diff --git a/Shorewall/init.sh b/Shorewall/init.sh index 7f0472aa4..a44acf548 100644 --- a/Shorewall/init.sh +++ b/Shorewall/init.sh @@ -31,6 +31,7 @@ RCDLINKS="2,S41 3,S41 6,K41" # # shorewall start Starts the firewall # shorewall restart Restarts the firewall +# shorewall reload Restarts the firewall # shorewall stop Stops the firewall # shorewall status Displays firewall status # @@ -51,7 +52,7 @@ RCDLINKS="2,S41 3,S41 6,K41" # Give Usage Information # ################################################################################ usage() { - echo "Usage: $0 start|stop|restart|status" + echo "Usage: $0 start|stop|reload|restart|status" exit 1 } @@ -71,19 +72,17 @@ fi command="$1" case "$command" in - start) - exec /sbin/shorewall $OPTIONS $@ ;; - stop|restart|status) - exec /sbin/shorewall $@ ;; + reload) + shift + exec /sbin/shorewall restart $@ + ;; *) - usage ;; - esac diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index a032df138..d686a1a32 100755 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -86,6 +86,9 @@ New Features in 3.0.3 192.168.1.4 gateway:/etc/openvpn# +7) /etc/init.d/shorewall now supports a 'reload' command which is + synonymous with the 'restart' command. + Problems Corrected in 3.0.2 1) A couple of typos in the one-interface sample configuration have diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 0055fe67c..b29831de8 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -38,9 +38,6 @@ # shorewall start Starts the firewall # shorewall restart Restarts the firewall # shorewall stop Stops the firewall -# shorewall monitor [ refresh-interval ] Repeatedly Displays firewall status -# plus the last 20 "interesting" -# packets # shorewall status Displays firewall status # shorewall reset Resets iptables packet and # byte counts