Package: vpnc-scripts
Version: 0.1~git20160829-1
Severity: wishlist
Tags: patch

Dear Maintainer,
I think is a good idea save original nameservers in new resolv.conf because
this increases reliability.
Thank you and excuse my bad english.

-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

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

Versions of packages vpnc-scripts depends on:
ii  iproute2   4.9.0-1
ii  net-tools  1.60+git20161116.90da8a0-1

vpnc-scripts recommends no packages.

Versions of packages vpnc-scripts suggests:
pn  dnsmasq         <none>
pn  openssh-server  <none>
pn  resolvconf      <none>

-- no debconf information
>From 41b4becdcd33119f9d23c7362f937e572d77223f Mon Sep 17 00:00:00 2001
From: Brilliantov Kirill Vladimirovich <brillian...@restream.rt.ru>
Date: Wed, 15 Mar 2017 21:02:48 +0300
Subject: [PATCH] vpnc-script: added use original nameservers

Signed-off-by: Brilliantov Kirill Vladimirovich <brillian...@restream.rt.ru>
---
 vpnc-script | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/vpnc-script b/vpnc-script
index 9c413e0..eb40af9 100755
--- a/vpnc-script
+++ b/vpnc-script
@@ -370,12 +370,13 @@ modify_resolvconf_generic() {
 # as long as the above mark is intact"
 
 	DOMAINS="$CISCO_DEF_DOMAIN"
+	NAMESERVER=
 
 	exec 6< "$RESOLV_CONF_BACKUP"
 	while read LINE <&6 ; do
 		case "$LINE" in
 			# omit; we will overwrite these
-			nameserver*) ;;
+			nameserver*) NAMESERVER="${LINE#* } $NAMESERVER";;
 			# extract listed domains and prepend to list
 			domain* | search*) DOMAINS="${LINE#* } $DOMAINS" ;;
 			# retain other lines
@@ -385,7 +386,7 @@ $LINE" ;;
 	done
 	exec 6<&-
 
-	for i in $INTERNAL_IP4_DNS ; do
+	for i in $INTERNAL_IP4_DNS $NAMESERVER; do
 		NEW_RESOLVCONF="$NEW_RESOLVCONF
 nameserver $i"
 	done
-- 
2.11.0

Reply via email to