diff options
Diffstat (limited to 'testing/shorewall/shorewall.initd')
-rw-r--r-- | testing/shorewall/shorewall.initd | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/testing/shorewall/shorewall.initd b/testing/shorewall/shorewall.initd index 1c5a5f6aee..6dadd30643 100644 --- a/testing/shorewall/shorewall.initd +++ b/testing/shorewall/shorewall.initd @@ -1,10 +1,16 @@ #!/sbin/runscript -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall-common/files/shorewall.initd,v 1.2 2008/05/04 13:16:40 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall/files/shorewall.initd,v 1.4 2013/07/13 14:09:09 constanze Exp $ -extra_started_commands="refresh" -extra_commands="clear reset check" +extra_commands="check clear" +extra_started_commands="refresh reset" + +checkconfig() { + if [ ! -d /var/lock/subsys ] ; then + checkpath -d -m 755 /var/lock/subsys + fi +} depend() { need net @@ -13,23 +19,25 @@ depend() { } start() { - ebegin "Starting firewall" + checkconfig + ebegin "Starting shorewall" /sbin/shorewall -f start 1>/dev/null eend $? } stop() { - ebegin "Stopping firewall" + ebegin "Stopping shorewall" /sbin/shorewall stop 1>/dev/null eend $? } restart() { + checkconfig # shorewall comes with its own control script that includes a # restart function, so refrain from calling svc_stop/svc_start # here. Note that this comment is required to fix bug 55576; # runscript.sh greps this script... (09 Jul 2004 agriffis) - ebegin "Restarting firewall" + ebegin "Restarting shorewall" /sbin/shorewall status >/dev/null if [ $? != 0 ] ; then svc_start @@ -47,7 +55,7 @@ clear() { # clear will remove all the rules and bring the system to an unfirewalled # state. (21 Nov 2004 eldad) - ebegin "Clearing all firewall rules and setting policy to ACCEPT" + ebegin "Clearing all shorewall rules and setting policy to ACCEPT" /sbin/shorewall clear eend $? } @@ -55,7 +63,7 @@ clear() { reset() { # reset the packet and byte counters in the firewall - ebegin "Resetting the packet and byte counters in the firewall" + ebegin "Resetting the packet and byte counters in the shorewall" /sbin/shorewall reset eend $? } @@ -65,7 +73,7 @@ refresh() { # interfaces, the black list, traffic control rules and # ECN control rules - ebegin "Refreshing firewall rules" + ebegin "Refreshing shorewall rules" /sbin/shorewall refresh eend $? } |