From 070dad6c8d4f4e02ad9f6f87169b7adc1ebeee34 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 20 Feb 2014 08:21:23 -0300 Subject: [PATCH] Use env var provided by openvpn to determine if it's tun or tap, it should fix #3475 --- usr/local/sbin/ovpn-linkup | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/usr/local/sbin/ovpn-linkup b/usr/local/sbin/ovpn-linkup index 3ebf32ee79..2f3246e8e6 100755 --- a/usr/local/sbin/ovpn-linkup +++ b/usr/local/sbin/ovpn-linkup @@ -3,9 +3,7 @@ # let the configuration system know that the ip has changed. #/usr/local/sbin/pfSctl -c "interface newip $interface" - -ifindex="${1##?????}" -if [ -e /dev/tun$ifindex ]; then +if [ "${dev_type}" = "tun" ]; then if [ "" != "$route_vpn_gateway" ]; then /bin/echo $route_vpn_gateway > /tmp/$1_router else