diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-04-25 00:27:47 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-04-25 00:27:47 +0000 |
commit | 453dbd2ce60966898342fa38f391c88b3b3713a9 (patch) | |
tree | 3a47ac15e461b128d4593f7b1b353fa980add3e5 /net-firewall | |
parent | initial import #90182 (diff) | |
download | gentoo-2-453dbd2ce60966898342fa38f391c88b3b3713a9.tar.gz gentoo-2-453dbd2ce60966898342fa38f391c88b3b3713a9.tar.bz2 gentoo-2-453dbd2ce60966898342fa38f391c88b3b3713a9.zip |
fix whitespace/syntax
(Portage version: 2.0.51.20)
Diffstat (limited to 'net-firewall')
-rw-r--r-- | net-firewall/iptables/files/ip6tables-1.2.9-r1.init | 68 | ||||
-rw-r--r-- | net-firewall/iptables/files/ip6tables.init | 75 | ||||
-rw-r--r-- | net-firewall/iptables/files/iptables-1.2.9-r1.init | 67 | ||||
-rw-r--r-- | net-firewall/iptables/files/iptables.init | 74 |
4 files changed, 138 insertions, 146 deletions
diff --git a/net-firewall/iptables/files/ip6tables-1.2.9-r1.init b/net-firewall/iptables/files/ip6tables-1.2.9-r1.init index dbf0c94cc19e..d30880ce3bd0 100644 --- a/net-firewall/iptables/files/ip6tables-1.2.9-r1.init +++ b/net-firewall/iptables/files/ip6tables-1.2.9-r1.init @@ -1,9 +1,9 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/ip6tables-1.2.9-r1.init,v 1.3 2004/08/18 22:08:21 aliz Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/ip6tables-1.2.9-r1.init,v 1.4 2005/04/25 00:27:47 vapier Exp $ -opts="start stop save reload" +opts="save reload" depend() { before net @@ -20,7 +20,7 @@ checkrules() { } start() { - checkrules || return 1 + checkrules || return 1 ebegin "Loading ip6tables state and starting firewall" einfo "Restoring ip6tables ruleset" /sbin/ip6tables-restore ${SAVE_RESTORE_OPTIONS} < ${IP6TABLES_SAVE} @@ -28,48 +28,46 @@ start() { } stop() { - if [ "${SAVE_ON_STOP}" = "yes" ]; then - save || return 1 - fi + if [ "${SAVE_ON_STOP}" = "yes" ]; then + save || return 1 + fi ebegin "Stopping firewall" - for a in `cat /proc/net/ip6_tables_names`; do - ip6tables -F -t $a - ip6tables -X -t $a + for a in `cat /proc/net/ip6_tables_names`; do + ip6tables -F -t $a + ip6tables -X -t $a - if [ $a == nat ]; then - /sbin/ip6tables -t nat -P PREROUTING ACCEPT - /sbin/ip6tables -t nat -P POSTROUTING ACCEPT - /sbin/ip6tables -t nat -P OUTPUT ACCEPT - elif [ $a == mangle ]; then - /sbin/ip6tables -t mangle -P PREROUTING ACCEPT - /sbin/ip6tables -t mangle -P INPUT ACCEPT - /sbin/ip6tables -t mangle -P FORWARD ACCEPT - /sbin/ip6tables -t mangle -P OUTPUT ACCEPT - /sbin/ip6tables -t mangle -P POSTROUTING ACCEPT - elif [ $a == filter ]; then - /sbin/ip6tables -t filter -P INPUT ACCEPT - /sbin/ip6tables -t filter -P FORWARD ACCEPT - /sbin/ip6tables -t filter -P OUTPUT ACCEPT - fi - done + if [ $a == nat ]; then + /sbin/ip6tables -t nat -P PREROUTING ACCEPT + /sbin/ip6tables -t nat -P POSTROUTING ACCEPT + /sbin/ip6tables -t nat -P OUTPUT ACCEPT + elif [ $a == mangle ]; then + /sbin/ip6tables -t mangle -P PREROUTING ACCEPT + /sbin/ip6tables -t mangle -P INPUT ACCEPT + /sbin/ip6tables -t mangle -P FORWARD ACCEPT + /sbin/ip6tables -t mangle -P OUTPUT ACCEPT + /sbin/ip6tables -t mangle -P POSTROUTING ACCEPT + elif [ $a == filter ]; then + /sbin/ip6tables -t filter -P INPUT ACCEPT + /sbin/ip6tables -t filter -P FORWARD ACCEPT + /sbin/ip6tables -t filter -P OUTPUT ACCEPT + fi + done eend $? } reload() { ebegin "Flushing firewall" - for a in `cat /proc/net/ip_tables_names`; do - /sbin/ip6tables -F -t $a - /sbin/ip6tables -X -t $a - done; + for a in `cat /proc/net/ip_tables_names`; do + /sbin/ip6tables -F -t $a + /sbin/ip6tables -X -t $a + done eend $? start } - save() { - ebegin "Saving ip6tables state" - /sbin/ip6tables-save ${SAVE_RESTORE_OPTIONS} > ${IP6TABLES_SAVE} - eend $? + ebegin "Saving ip6tables state" + /sbin/ip6tables-save ${SAVE_RESTORE_OPTIONS} > ${IP6TABLES_SAVE} + eend $? } - diff --git a/net-firewall/iptables/files/ip6tables.init b/net-firewall/iptables/files/ip6tables.init index c51ccb424a08..6b6515001aac 100644 --- a/net-firewall/iptables/files/ip6tables.init +++ b/net-firewall/iptables/files/ip6tables.init @@ -1,10 +1,9 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or -# later -# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/ip6tables.init,v 1.5 2004/07/14 23:30:37 agriffis Exp $ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/ip6tables.init,v 1.6 2005/04/25 00:27:47 vapier Exp $ -opts="start stop save reload" +opts="save reload" depend() { need logger net @@ -20,7 +19,7 @@ checkrules() { } start() { - checkrules || return 1 + checkrules || return 1 ebegin "Loading ip6tables state and starting firewall" einfo "Restoring ip6tables ruleset" /sbin/ip6tables-restore ${SAVE_RESTORE_OPTIONS} < ${IP6TABLES_SAVE} @@ -28,56 +27,54 @@ start() { if [ "${ENABLE_FORWARDING_IPv6}" = "yes" ] ; then einfo "Enabling forwarding for ipv6" echo "1" > /proc/sys/net/ipv6/conf/all/forwarding - fi + fi eend $? } stop() { ebegin "Stopping firewall" - # set sane defaults that disable forwarding - if [ -f /proc/sys/net/ipv6/conf/all/forwarding ] ; then - echo "0" > /proc/sys/net/ipv6/conf/all/forwarding - fi + # set sane defaults that disable forwarding + if [ -f /proc/sys/net/ipv6/conf/all/forwarding ] ; then + echo "0" > /proc/sys/net/ipv6/conf/all/forwarding + fi - for a in `cat /proc/net/ip6_tables_names`; do - ip6tables -F -t $a - ip6tables -X -t $a + for a in `cat /proc/net/ip6_tables_names`; do + ip6tables -F -t $a + ip6tables -X -t $a - if [ $a == nat ]; then - /sbin/ip6tables -t nat -P PREROUTING ACCEPT - /sbin/ip6tables -t nat -P POSTROUTING ACCEPT - /sbin/ip6tables -t nat -P OUTPUT ACCEPT - elif [ $a == mangle ]; then - /sbin/ip6tables -t mangle -P PREROUTING ACCEPT - /sbin/ip6tables -t mangle -P INPUT ACCEPT - /sbin/ip6tables -t mangle -P FORWARD ACCEPT - /sbin/ip6tables -t mangle -P OUTPUT ACCEPT - /sbin/ip6tables -t mangle -P POSTROUTING ACCEPT - elif [ $a == filter ]; then - /sbin/ip6tables -t filter -P INPUT ACCEPT - /sbin/ip6tables -t filter -P FORWARD ACCEPT - /sbin/ip6tables -t filter -P OUTPUT ACCEPT - fi - done + if [ $a == nat ]; then + /sbin/ip6tables -t nat -P PREROUTING ACCEPT + /sbin/ip6tables -t nat -P POSTROUTING ACCEPT + /sbin/ip6tables -t nat -P OUTPUT ACCEPT + elif [ $a == mangle ]; then + /sbin/ip6tables -t mangle -P PREROUTING ACCEPT + /sbin/ip6tables -t mangle -P INPUT ACCEPT + /sbin/ip6tables -t mangle -P FORWARD ACCEPT + /sbin/ip6tables -t mangle -P OUTPUT ACCEPT + /sbin/ip6tables -t mangle -P POSTROUTING ACCEPT + elif [ $a == filter ]; then + /sbin/ip6tables -t filter -P INPUT ACCEPT + /sbin/ip6tables -t filter -P FORWARD ACCEPT + /sbin/ip6tables -t filter -P OUTPUT ACCEPT + fi + done eend $? } reload() { ebegin "Flushing firewall" - for a in `cat /proc/net/ip6_tables_names`; do - /sbin/ip6tables -F -t $a - /sbin/ip6tables -X -t $a - done; + for a in `cat /proc/net/ip6_tables_names`; do + /sbin/ip6tables -F -t $a + /sbin/ip6tables -X -t $a + done eend $? start } - save() { - ebegin "Saving ip6tables state" - /sbin/ip6tables-save ${SAVE_RESTORE_OPTIONS} > ${IP6TABLES_SAVE} - eend $? + ebegin "Saving ip6tables state" + /sbin/ip6tables-save ${SAVE_RESTORE_OPTIONS} > ${IP6TABLES_SAVE} + eend $? } - diff --git a/net-firewall/iptables/files/iptables-1.2.9-r1.init b/net-firewall/iptables/files/iptables-1.2.9-r1.init index 80662f176858..9c96a242f0c9 100644 --- a/net-firewall/iptables/files/iptables-1.2.9-r1.init +++ b/net-firewall/iptables/files/iptables-1.2.9-r1.init @@ -1,9 +1,9 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/iptables-1.2.9-r1.init,v 1.3 2004/08/18 22:08:21 aliz Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/iptables-1.2.9-r1.init,v 1.4 2005/04/25 00:27:47 vapier Exp $ -opts="start stop save reload" +opts="save reload" depend() { before net @@ -20,10 +20,10 @@ checkrules() { } start() { - checkrules || return 1 + checkrules || return 1 ebegin "Loading iptables state and starting firewall" einfo "Restoring iptables ruleset" - /sbin/iptables-restore ${SAVE_RESTORE_OPTIONS} < ${IPTABLES_SAVE} + /sbin/iptables-restore ${SAVE_RESTORE_OPTIONS} < ${IPTABLES_SAVE} eend $? } @@ -32,43 +32,42 @@ stop() { save || return 1 fi ebegin "Stopping firewall" - for a in `cat /proc/net/ip_tables_names`; do - /sbin/iptables -F -t $a - /sbin/iptables -X -t $a - - if [ $a == nat ]; then - /sbin/iptables -t nat -P PREROUTING ACCEPT - /sbin/iptables -t nat -P POSTROUTING ACCEPT - /sbin/iptables -t nat -P OUTPUT ACCEPT - elif [ $a == mangle ]; then - /sbin/iptables -t mangle -P PREROUTING ACCEPT - /sbin/iptables -t mangle -P INPUT ACCEPT - /sbin/iptables -t mangle -P FORWARD ACCEPT - /sbin/iptables -t mangle -P OUTPUT ACCEPT - /sbin/iptables -t mangle -P POSTROUTING ACCEPT - elif [ $a == filter ]; then - /sbin/iptables -t filter -P INPUT ACCEPT - /sbin/iptables -t filter -P FORWARD ACCEPT - /sbin/iptables -t filter -P OUTPUT ACCEPT - fi - done + for a in `cat /proc/net/ip_tables_names`; do + /sbin/iptables -F -t $a + /sbin/iptables -X -t $a + + if [ $a == nat ]; then + /sbin/iptables -t nat -P PREROUTING ACCEPT + /sbin/iptables -t nat -P POSTROUTING ACCEPT + /sbin/iptables -t nat -P OUTPUT ACCEPT + elif [ $a == mangle ]; then + /sbin/iptables -t mangle -P PREROUTING ACCEPT + /sbin/iptables -t mangle -P INPUT ACCEPT + /sbin/iptables -t mangle -P FORWARD ACCEPT + /sbin/iptables -t mangle -P OUTPUT ACCEPT + /sbin/iptables -t mangle -P POSTROUTING ACCEPT + elif [ $a == filter ]; then + /sbin/iptables -t filter -P INPUT ACCEPT + /sbin/iptables -t filter -P FORWARD ACCEPT + /sbin/iptables -t filter -P OUTPUT ACCEPT + fi + done eend $? } reload() { ebegin "Flushing firewall" - for a in `cat /proc/net/ip_tables_names`; do - /sbin/iptables -F -t $a - /sbin/iptables -X -t $a - done; - eend $? + for a in `cat /proc/net/ip_tables_names`; do + /sbin/iptables -F -t $a + /sbin/iptables -X -t $a + done; + eend $? start } save() { - ebegin "Saving iptables state" - /sbin/iptables-save ${SAVE_RESTORE_OPTIONS} > ${IPTABLES_SAVE} - eend $? + ebegin "Saving iptables state" + /sbin/iptables-save ${SAVE_RESTORE_OPTIONS} > ${IPTABLES_SAVE} + eend $? } - diff --git a/net-firewall/iptables/files/iptables.init b/net-firewall/iptables/files/iptables.init index db7a9a22726f..cc9e49950f74 100644 --- a/net-firewall/iptables/files/iptables.init +++ b/net-firewall/iptables/files/iptables.init @@ -1,10 +1,9 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or -# later -# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/iptables.init,v 1.4 2004/07/14 23:30:37 agriffis Exp $ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/iptables.init,v 1.5 2005/04/25 00:27:47 vapier Exp $ -opts="start stop save reload" +opts="save reload" depend() { need logger net @@ -20,7 +19,7 @@ checkrules() { } start() { - checkrules || return 1 + checkrules || return 1 ebegin "Loading iptables state and starting firewall" einfo "Restoring iptables ruleset" /sbin/iptables-restore ${SAVE_RESTORE_OPTIONS} < ${IPTABLES_SAVE} @@ -35,48 +34,47 @@ start() { stop() { ebegin "Stopping firewall" - # set sane defaults that disable forwarding - if [ -f /proc/sys/net/ipv4/conf/all/forwarding ] ; then - echo "0" > /proc/sys/net/ipv4/conf/all/forwarding - fi + # set sane defaults that disable forwarding + if [ -f /proc/sys/net/ipv4/conf/all/forwarding ] ; then + echo "0" > /proc/sys/net/ipv4/conf/all/forwarding + fi - for a in `cat /proc/net/ip_tables_names`; do - /sbin/iptables -F -t $a - /sbin/iptables -X -t $a + for a in `cat /proc/net/ip_tables_names`; do + /sbin/iptables -F -t $a + /sbin/iptables -X -t $a - if [ $a == nat ]; then - /sbin/iptables -t nat -P PREROUTING ACCEPT - /sbin/iptables -t nat -P POSTROUTING ACCEPT - /sbin/iptables -t nat -P OUTPUT ACCEPT - elif [ $a == mangle ]; then - /sbin/iptables -t mangle -P PREROUTING ACCEPT - /sbin/iptables -t mangle -P INPUT ACCEPT - /sbin/iptables -t mangle -P FORWARD ACCEPT - /sbin/iptables -t mangle -P OUTPUT ACCEPT - /sbin/iptables -t mangle -P POSTROUTING ACCEPT - elif [ $a == filter ]; then - /sbin/iptables -t filter -P INPUT ACCEPT - /sbin/iptables -t filter -P FORWARD ACCEPT - /sbin/iptables -t filter -P OUTPUT ACCEPT - fi - done + if [ $a == nat ]; then + /sbin/iptables -t nat -P PREROUTING ACCEPT + /sbin/iptables -t nat -P POSTROUTING ACCEPT + /sbin/iptables -t nat -P OUTPUT ACCEPT + elif [ $a == mangle ]; then + /sbin/iptables -t mangle -P PREROUTING ACCEPT + /sbin/iptables -t mangle -P INPUT ACCEPT + /sbin/iptables -t mangle -P FORWARD ACCEPT + /sbin/iptables -t mangle -P OUTPUT ACCEPT + /sbin/iptables -t mangle -P POSTROUTING ACCEPT + elif [ $a == filter ]; then + /sbin/iptables -t filter -P INPUT ACCEPT + /sbin/iptables -t filter -P FORWARD ACCEPT + /sbin/iptables -t filter -P OUTPUT ACCEPT + fi + done eend $? } reload() { ebegin "Flushing firewall" - for a in `cat /proc/net/ip_tables_names`; do - /sbin/iptables -F -t $a - /sbin/iptables -X -t $a - done; - eend $? + for a in `cat /proc/net/ip_tables_names`; do + /sbin/iptables -F -t $a + /sbin/iptables -X -t $a + done + eend $? start } save() { - ebegin "Saving iptables state" - /sbin/iptables-save ${SAVE_RESTORE_OPTIONS} > ${IPTABLES_SAVE} - eend $? + ebegin "Saving iptables state" + /sbin/iptables-save ${SAVE_RESTORE_OPTIONS} > ${IPTABLES_SAVE} + eend $? } - |