summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Góes <vanquirius@gentoo.org>2006-02-19 02:33:35 +0000
committerMarcelo Góes <vanquirius@gentoo.org>2006-02-19 02:33:35 +0000
commit224ff47180258faaf733b9f096976c77b7193487 (patch)
treec669d5cd207809bc036df15f98401fee621b5304 /net-firewall/shorewall/files
parentBlock old versions of pscan to avoid file collisions (see bug #116236) (diff)
downloadhistorical-224ff47180258faaf733b9f096976c77b7193487.tar.gz
historical-224ff47180258faaf733b9f096976c77b7193487.tar.bz2
historical-224ff47180258faaf733b9f096976c77b7193487.zip
Update init script to use restore functionality for bug 91343. Thanks to Christopher DeMarco <cmd at alephant dot net>.
Package-Manager: portage-2.0.54 vanquish yourself edition
Diffstat (limited to 'net-firewall/shorewall/files')
-rw-r--r--net-firewall/shorewall/files/digest-shorewall-3.0.5-r1 (renamed from net-firewall/shorewall/files/digest-shorewall-3.0.5)0
-rw-r--r--net-firewall/shorewall/files/shorewall-r147
2 files changed, 47 insertions, 0 deletions
diff --git a/net-firewall/shorewall/files/digest-shorewall-3.0.5 b/net-firewall/shorewall/files/digest-shorewall-3.0.5-r1
index 011c14bef521..011c14bef521 100644
--- a/net-firewall/shorewall/files/digest-shorewall-3.0.5
+++ b/net-firewall/shorewall/files/digest-shorewall-3.0.5-r1
diff --git a/net-firewall/shorewall/files/shorewall-r1 b/net-firewall/shorewall/files/shorewall-r1
new file mode 100644
index 000000000000..548b4d95c01d
--- /dev/null
+++ b/net-firewall/shorewall/files/shorewall-r1
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall/files/shorewall-r1,v 1.1 2006/02/19 02:33:35 vanquirius Exp $
+
+opts="start stop restart clear"
+
+depend() {
+ need net
+ provide firewall
+ after ulogd
+}
+
+start() {
+ ebegin "Starting firewall"
+ /sbin/shorewall -f start 1>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping firewall"
+ /sbin/shorewall stop 1>/dev/null
+ eend $?
+}
+
+restart() {
+ # 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"
+ if [ -f /var/lib/shorewall/restore ] ; then
+ /sbin/shorewall restore
+ else
+ /sbin/shorewall restart 1>/dev/null
+ fi
+ eend $?
+}
+
+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"
+ /sbin/shorewall clear
+ eend $?
+}