freebsd-ports/security/vpnc/files/patch-vpnc-script.in

29 lines
786 B
Text

--- vpnc-script.in.orig 2008-11-24 00:18:37.000000000 +0100
+++ vpnc-script.in 2008-11-24 00:21:54.000000000 +0100
@@ -48,8 +48,8 @@
OS="`uname -s`"
-DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute
-RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup
+DEFAULT_ROUTE_FILE=/var/run/vpnc.defaultroute
+RESOLV_CONF_BACKUP=/var/run/vpnc.resolv.conf-backup
FULL_SCRIPTNAME=@PREFIX@/sbin/vpnc
SCRIPTNAME=`basename $FULL_SCRIPTNAME`
@@ -420,11 +420,13 @@
fi
fi
elif [ "$OS" = "FreeBSD" ]; then
- if [ ! -e /dev/tun ]; then
+ kldstat -q -m if_tun
+ if [ ${?} != 0 ]; then
kldload if_tun
fi
elif [ "$OS" = "GNU/kFreeBSD" ]; then
- if [ ! -e /dev/tun ]; then
+ kldstat -q -m if_tun
+ if [ ${?} != 0 ]; then
kldload if_tun
fi
elif [ "$OS" = "NetBSD" ]; then