Package: vpnc
Version: 0.5.3r550-3
Severity: wishlist
Tags: patch

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 the attached patch, a vpnc configfile line of:

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

should do the trick.

Thanks for maintaining vpnc in debian!

       --dkg

-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (500, 'oldstable'), 
(200, 'unstable-debug'), (200, 'unstable'), (1, 'experimental-debug'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vpnc depends on:
ii  libc6         2.26-6
ii  libgcrypt20   1.8.1-4
ii  libgnutls30   3.5.17-1
ii  perl          5.26.1-4+b1
ii  vpnc-scripts  0.1~git20160829-1

Versions of packages vpnc recommends:
ii  iproute2  4.14.1-2

Versions of packages vpnc suggests:
pn  resolvconf  <none>

-- Configuration Files:
/etc/vpnc/default.conf [Errno 13] Permission denied: '/etc/vpnc/default.conf'

-- no debconf information
diff --git a/vpnc-script b/vpnc-script
index 79cf6e2..b54f55a 100755
--- a/vpnc-script
+++ b/vpnc-script
@@ -116,7 +116,11 @@ else
        ifconfig_syntax_ptpv6=""
 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

Reply via email to