[PATCH] Make it easy to decline resolv.conf updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There are situations where the user wants to use the routing
information offered by the VPN, but does not want to use the DNS
recommendations.

In this case, it'd be nice to be able to tell vpnc this preference.

With this change, a vpnc configfile line should do the right thing:

      Script /usr/share/vpnc-scripts/vpnc-script --no-update-resolv.conf

Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
 vpnc-script | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/vpnc-script b/vpnc-script
index ae13947..b986bd8 100755
--- a/vpnc-script
+++ b/vpnc-script
@@ -123,7 +123,11 @@ else
 	RESOLVEDENABLED=0
 fi
 
-if [ -r /etc/openwrt_release ] && [ -n "$OPENWRT_INTERFACE" ]; then
+
+if [ "$1" = "--no-update-resolv.conf" ]; then
+	MODIFYRESOLVCONF=true
+	RESTORERESOLVCONF=true
+elif [ -r /etc/openwrt_release ] && [ -n "$OPENWRT_INTERFACE" ]; then
         . /etc/functions.sh
 	include /lib/network
 	MODIFYRESOLVCONF=modify_resolvconf_openwrt
-- 
2.16.1




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux