summaryrefslogtreecommitdiff
path: root/net/vpnc/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'net/vpnc/patches/patch-ac')
-rw-r--r--net/vpnc/patches/patch-ac38
1 files changed, 36 insertions, 2 deletions
diff --git a/net/vpnc/patches/patch-ac b/net/vpnc/patches/patch-ac
index 8ad468cb58c..26fa2485a66 100644
--- a/net/vpnc/patches/patch-ac
+++ b/net/vpnc/patches/patch-ac
@@ -1,7 +1,32 @@
-$NetBSD: patch-ac,v 1.8 2011/03/05 17:46:41 cegger Exp $
+$NetBSD: patch-ac,v 1.9 2011/04/14 21:27:39 hans Exp $
---- vpnc-script.in.orig 2011-03-01 14:40:25.000000000 +0000
+--- vpnc-script.in.orig 2009-02-04 14:40:43.000000000 +0100
+++ vpnc-script.in
+@@ -48,18 +48,19 @@ PATH=/sbin:/usr/sbin:$PATH
+
+ OS="`uname -s`"
+
+-DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute
+-RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup
++STATEDIR=@VARBASE@/run/vpnc
++DEFAULT_ROUTE_FILE=$STATEDIR/defaultroute
++RESOLV_CONF_BACKUP=$STATEDIR/resolv.conf-backup
+ FULL_SCRIPTNAME=@PREFIX@/sbin/vpnc
+ SCRIPTNAME=`basename $FULL_SCRIPTNAME`
+
+ # some systems, eg. Darwin & FreeBSD, prune /var/run on boot
+-if [ ! -d "/var/run/vpnc" ]; then
+- mkdir -p /var/run/vpnc
++if [ ! -d $STATEDIR ]; then
++ mkdir -p $STATEDIR
+ fi
+
+ # stupid SunOS: no blubber in /usr/local/bin ... (on stdout)
+-IPROUTE="`which ip | grep '^/' 2> /dev/null`"
++IPROUTE="`command -v ip | grep '^/' 2> /dev/null`"
+
+ if [ "$OS" = "Linux" ]; then
+ ifconfig_syntax_ptp="pointopoint"
@@ -94,7 +94,7 @@ do_ifconfig() {
DEV=$($IPROUTE route | grep ^default | sed 's/^.* dev \([[:alnum:]-]\+\).*$/\1/')
MTU=$(($($IPROUTE link show "$DEV" | grep mtu | sed 's/^.* mtu \([[:digit:]]\+\).*$/\1/') - 88))
@@ -11,6 +36,15 @@ $NetBSD: patch-ac,v 1.8 2011/03/05 17:46:41 cegger Exp $
fi
# Point to point interface require a netmask of 255.255.255.255 on some systems
+@@ -163,7 +164,7 @@ else # use route command
+ # isn't -n supposed to give --numeric output?
+ # apperently not...
+ # Get rid of lines containing IPv6 addresses (':')
+- netstat -r -n | awk '/:/ { next; } /^(default|0\.0\.0\.0)/ { print $2; }'
++ netstat -r -n | awk '/:/ { next; } $2 ~ /^link/ { next; } /^(default|0\.0\.0\.0)/ { print $2; }'
+ }
+
+ set_vpngateway_route() {
@@ -440,6 +440,20 @@ do_pre_init() {
}