SOURCES: iptables.init, ip6tables.init - use pld functions
glen
glen at pld-linux.org
Sun Oct 1 23:45:34 CEST 2006
Author: glen Date: Sun Oct 1 21:45:34 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use pld functions
---- Files affected:
SOURCES:
iptables.init (1.4 -> 1.5) , ip6tables.init (1.5 -> 1.6)
---- Diffs:
================================================================
Index: SOURCES/iptables.init
diff -u SOURCES/iptables.init:1.4 SOURCES/iptables.init:1.5
--- SOURCES/iptables.init:1.4 Thu Dec 8 02:02:49 2005
+++ SOURCES/iptables.init Sun Oct 1 23:45:29 2006
@@ -19,23 +19,11 @@
IPTABLES_CONFIG=/etc/sysconfig/iptables
-if [ ! -x /usr/sbin/iptables ]; then
+if [ "$(kernelver)" -lt "002003000" ]; then
exit 0
fi
-KERNELMAJ=`uname -r | sed -e 's,\..*,,'`
-KERNELMIN=`uname -r | sed -e 's,[^\.]*\.,,' -e 's,\..*,,'`
-
-if [ "$KERNELMAJ" -lt 2 ] ; then
- exit 0
-fi
-if [ "$KERNELMAJ" -eq 2 -a "$KERNELMIN" -lt 3 ] ; then
- exit 0
-fi
-
-
-
-if /sbin/lsmod 2>/dev/null |grep -q ipchains ; then
+if /sbin/lsmod 2>/dev/null | grep -q ipchains ; then
# Don't do both
exit 0
fi
@@ -189,4 +177,3 @@
esac
exit 0
-
================================================================
Index: SOURCES/ip6tables.init
diff -u SOURCES/ip6tables.init:1.5 SOURCES/ip6tables.init:1.6
--- SOURCES/ip6tables.init:1.5 Thu Dec 8 02:02:49 2005
+++ SOURCES/ip6tables.init Sun Oct 1 23:45:29 2006
@@ -19,23 +19,11 @@
IPTABLES_CONFIG=/etc/sysconfig/ip6tables
-if [ ! -x /usr/sbin/ip6tables ]; then
+if [ "$(kernelver)" -lt "002003000" ]; then
exit 0
fi
-KERNELMAJ=`uname -r | sed -e 's,\..*,,'`
-KERNELMIN=`uname -r | sed -e 's,[^\.]*\.,,' -e 's,\..*,,'`
-
-if [ "$KERNELMAJ" -lt 2 ] ; then
- exit 0
-fi
-if [ "$KERNELMAJ" -eq 2 -a "$KERNELMIN" -lt 3 ] ; then
- exit 0
-fi
-
-
-
-if /sbin/lsmod 2>/dev/null |grep -q ipchains ; then
+if /sbin/lsmod 2>/dev/null | grep -q ipchains; then
# Don't do both
exit 0
fi
@@ -189,4 +177,3 @@
esac
exit 0
-
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/iptables.init?r1=1.4&r2=1.5&f=u
http://cvs.pld-linux.org/SOURCES/ip6tables.init?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list