summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/bastille/files/bastille-2.1.1-firewall.init')
-rw-r--r--app-admin/bastille/files/bastille-2.1.1-firewall.init41
1 files changed, 41 insertions, 0 deletions
diff --git a/app-admin/bastille/files/bastille-2.1.1-firewall.init b/app-admin/bastille/files/bastille-2.1.1-firewall.init
new file mode 100644
index 000000000000..aa81a34b9215
--- /dev/null
+++ b/app-admin/bastille/files/bastille-2.1.1-firewall.init
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/bastille/files/bastille-2.1.1-firewall.init,v 1.1 2003/10/22 20:38:08 seemant Exp $
+
+opts="start stop"
+
+depend() {
+ need logger
+}
+
+start() {
+ # "Borrowed" from the original bastille-firewall init script ((c) P. Watkins)
+ REALSCRIPT=/sbin/bastille-ipchains
+ if [ -n "$(uname -r | awk -F. ' $1 == 2 && $2 > 2 {print}')" ]; then
+ # We are using Linux 2.3 or newer; use the netfilter script if available
+ if [ -x /sbin/bastille-netfilter ]; then
+ REALSCRIPT=/sbin/bastille-netfilter
+ fi
+ fi
+
+ ebegin "Starting bastille-firewall"
+ $REALSCRIPT start
+ eend $? "Failed to start bastille-firewall"
+}
+
+stop() {
+ # "Borrowed" from the original bastille-firewall init script ((c) P. Watkins)
+ REALSCRIPT=/sbin/bastille-ipchains
+ if [ -n "$(uname -r | awk -F. ' $1 == 2 && $2 > 2 {print}')" ]; then
+ # We are using Linux 2.3 or newer; use the netfilter script if available
+ if [ -x /sbin/bastille-netfilter ]; then
+ REALSCRIPT=/sbin/bastille-netfilter
+ fi
+ fi
+
+ ebegin "Stopping bastille-firewall"
+ $REALSCRIPT stop
+ eend $? "Failed to stop bastille-firewall"
+}
+