aboutsummaryrefslogtreecommitdiffstats
path: root/security/vpnc/files/patch-vpnc-script.in
blob: 591456134b6bb835d3b35b4e3e7687b1c1aca385 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- 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