mtr: moved to github
[packages.git] / net / nocatauth / patches / 004-fw_detect.patch
1 diff -urN NoCatAuth-nightly/bin/detect-fw.sh NoCatAuth-nightly.new/bin/detect-fw.sh
2 --- NoCatAuth-nightly/bin/detect-fw.sh  2010-03-27 17:44:01.000000000 +0100
3 +++ NoCatAuth-nightly.new/bin/detect-fw.sh      2010-03-27 17:44:39.000000000 +0100
4 @@ -6,47 +6,12 @@
5  if [ -n "$1" -a -n "$2" -a -d "$2/$1" ]; then
6      FIREWALL=$1
7      shift
8 -
9 -# Do we have iptables *and* are running Linux 2.4?
10 -#
11 -elif which iptables >/dev/null 2>&1 ; then
12 -    FIREWALL=iptables
13 -    FW_BIN=iptables
14 -
15 -#
16 -# Or do we have ipchains?
17 -#
18 -elif which ipchains >/dev/null 2>&1; then
19 -    FIREWALL=ipchains
20 -    FW_BIN=ipchains
21 -
22 -#
23 -# Or ip_filter (e.g. *BSD, Solaris, HP-UX, etc)?
24 -# <http://www.ipfilter.org/>
25 -#
26 -elif which ipf >/dev/null 2>&1; then
27 -ipf_running="`ipf -V | grep 'Running' | awk '{print $2}'`";
28 -    if [ "$ipf_running" = "yes" ]; then
29 -       FIREWALL="ipfilter"
30 -       FW_BIN=ipf
31 -    else
32 -        echo "ERROR: ip_filter appears to exist, but we're not postive that it's running"
33 -       echo "1. You must be root for us to verify this"
34 -        echo "2. Check that it's compiled in your kernel (either staticlly or a loaded module)"
35 -    fi
36 -
37 -# Or packetfilter (OpenBSD 3.0+)
38 -elif which pfctl >/dev/null 2>&1; then
39 -    FIREWALL=pf
40 -    FW_BIN=pfctl
41 -
42 -else
43 -    echo "No supported firewalls detected! Check your path."
44 -    echo "Supported firewalls include: iptables, ipchains, ipf, pf."
45 -    exit 1
46  fi
47  
48 -echo $(which $FW_BIN) found.
49 +FIREWALL=iptables
50 +FW_BIN=iptables
51 +
52 +echo $FW_BIN found.
53  
54  # Remove the existing *.fw links in /usr/local/nocat/bin (or wherever this is being run from)
55  TARGET=$1