[package] fix nocatauth check for iptables (#6929)
authorFlorian Fainelli <florian@openwrt.org>
Sat, 27 Mar 2010 17:21:05 +0000 (17:21 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 27 Mar 2010 17:21:05 +0000 (17:21 +0000)
SVN-Revision: 20520

net/nocatauth/patches/004-fw_detect.patch [new file with mode: 0644]

diff --git a/net/nocatauth/patches/004-fw_detect.patch b/net/nocatauth/patches/004-fw_detect.patch
new file mode 100644 (file)
index 0000000..18bb971
--- /dev/null
@@ -0,0 +1,55 @@
+diff -urN NoCatAuth-nightly/bin/detect-fw.sh NoCatAuth-nightly.new/bin/detect-fw.sh
+--- NoCatAuth-nightly/bin/detect-fw.sh 2010-03-27 17:44:01.000000000 +0100
++++ NoCatAuth-nightly.new/bin/detect-fw.sh     2010-03-27 17:44:39.000000000 +0100
+@@ -6,47 +6,12 @@
+ if [ -n "$1" -a -n "$2" -a -d "$2/$1" ]; then
+     FIREWALL=$1
+     shift
+-
+-# Do we have iptables *and* are running Linux 2.4?
+-#
+-elif which iptables >/dev/null 2>&1 ; then
+-    FIREWALL=iptables
+-    FW_BIN=iptables
+-
+-#
+-# Or do we have ipchains?
+-#
+-elif which ipchains >/dev/null 2>&1; then
+-    FIREWALL=ipchains
+-    FW_BIN=ipchains
+-
+-#
+-# Or ip_filter (e.g. *BSD, Solaris, HP-UX, etc)?
+-# <http://www.ipfilter.org/>
+-#
+-elif which ipf >/dev/null 2>&1; then
+-ipf_running="`ipf -V | grep 'Running' | awk '{print $2}'`";
+-    if [ "$ipf_running" = "yes" ]; then
+-      FIREWALL="ipfilter"
+-      FW_BIN=ipf
+-    else
+-        echo "ERROR: ip_filter appears to exist, but we're not postive that it's running"
+-      echo "1. You must be root for us to verify this"
+-        echo "2. Check that it's compiled in your kernel (either staticlly or a loaded module)"
+-    fi
+-
+-# Or packetfilter (OpenBSD 3.0+)
+-elif which pfctl >/dev/null 2>&1; then
+-    FIREWALL=pf
+-    FW_BIN=pfctl
+-
+-else
+-    echo "No supported firewalls detected! Check your path."
+-    echo "Supported firewalls include: iptables, ipchains, ipf, pf."
+-    exit 1
+ fi
+-echo $(which $FW_BIN) found.
++FIREWALL=iptables
++FW_BIN=iptables
++
++echo $FW_BIN found.
+ # Remove the existing *.fw links in /usr/local/nocat/bin (or wherever this is being run from)
+ TARGET=$1