]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
include calling process ID in DEFAULT_ROUTE_FILE{,_IPV6}
authorDaniel Lenski <dlenski@gmail.com>
Wed, 25 Nov 2020 16:37:05 +0000 (08:37 -0800)
committerDaniel Lenski <dlenski@gmail.com>
Wed, 25 Nov 2020 18:45:47 +0000 (18:45 +0000)
This should allow multiple "stacked" VPNs to run concurrently while
preserving the default route(s).  There is still a race condition if they
aren't terminated in the correct order.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
vpnc-script

index b11cf73081640307cdc7217f2025d81190e70f16..86c15ace944ed7fd850c294651177063c5627b51 100755 (executable)
@@ -79,8 +79,8 @@ PATH=/sbin:/usr/sbin:$PATH
 OS="`uname -s`"
 
 HOOKS_DIR=/etc/vpnc
-DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute
-DEFAULT_ROUTE_FILE_IPV6=/var/run/vpnc/defaultroute_ipv6
+DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute.${PPID}
+DEFAULT_ROUTE_FILE_IPV6=/var/run/vpnc/defaultroute_ipv6.${PPID}
 RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup
 SCRIPTNAME=`basename $0`