From: Florian Fainelli Date: Sat, 27 Mar 2010 17:21:05 +0000 (+0000) Subject: [package] fix nocatauth check for iptables (#6929) X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=389d5439cef5bb8415724c8793a32da4529e9e82 [package] fix nocatauth check for iptables (#6929) SVN-Revision: 20520 --- diff --git a/net/nocatauth/patches/004-fw_detect.patch b/net/nocatauth/patches/004-fw_detect.patch new file mode 100644 index 0000000000..18bb971bea --- /dev/null +++ b/net/nocatauth/patches/004-fw_detect.patch @@ -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)? +-# +-# +-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