summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-03-28 10:37:11 +0000
committerErmal <eri@pfsense.org>2011-03-28 10:37:11 +0000
commit7f2c8034fb5d31503ffb5921427a9be8f1eea0e3 (patch)
tree85bbc4b5246e8502a5752e716b9d2c2b0afb8b11 /usr/local/sbin
parent17730d9d862d2bee9ca9e87c31ca10cf1bd460a7 (diff)
downloadpfsense-7f2c8034fb5d31503ffb5921427a9be8f1eea0e3.zip
pfsense-7f2c8034fb5d31503ffb5921427a9be8f1eea0e3.tar.gz
Test the existence of route_vpn_gateway variable and if set use it as a gateway. Recommended-by: http://forum.pfsense.org/index.php/topic,24436.msg158589.html#msg158589
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/ovpn-linkup6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/local/sbin/ovpn-linkup b/usr/local/sbin/ovpn-linkup
index 60489c2..613822c 100755
--- a/usr/local/sbin/ovpn-linkup
+++ b/usr/local/sbin/ovpn-linkup
@@ -2,7 +2,11 @@
# let the configuration system know that the ip has changed.
#/usr/local/sbin/pfSctl -c "interface newip $interface"
-/bin/echo $4 > /tmp/$1_router
+if [ -n $route_vpn_gateway ]; then
+ /bin/echo $route_vpn_gateway > /tmp/$1_router
+else
+ /bin/echo $4 > /tmp/$1_router
+fi
/usr/bin/touch /tmp/$1up
# reload filter
/usr/local/sbin/pfSctl -c "interface newip $1"
OpenPOWER on IntegriCloud