[package] fix nocatauth check for iptables (#6929)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@20520 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a7db7c16d1
commit
2bee27d58e
55
net/nocatauth/patches/004-fw_detect.patch
Normal file
55
net/nocatauth/patches/004-fw_detect.patch
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user