diff options
author | 2003-10-22 20:38:09 +0000 | |
---|---|---|
committer | 2003-10-22 20:38:09 +0000 | |
commit | f8d22d78dc7b41f4909651d3b0fd815a45e9b172 (patch) | |
tree | a7ad4b3b2624601a437999caa4b857ef9c1c50b6 /app-admin/bastille/files | |
parent | fix perldoc emptydirs in 5.8.1 (diff) | |
download | historical-f8d22d78dc7b41f4909651d3b0fd815a45e9b172.tar.gz historical-f8d22d78dc7b41f4909651d3b0fd815a45e9b172.tar.bz2 historical-f8d22d78dc7b41f4909651d3b0fd815a45e9b172.zip |
gentoofication of initscript for firewall
Diffstat (limited to 'app-admin/bastille/files')
-rw-r--r-- | app-admin/bastille/files/bastille-2.1.1-firewall.init | 41 |
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" +} + |