[SCM] live-debconfig branch, debian-next, updated. debian/4.0_a2-1-12-g6fa63d8

Daniel Baumann daniel at debian.org
Thu Aug 16 13:36:31 UTC 2012


The following commit has been merged in the debian-next branch:
commit 6fa63d8188b36da1b97e5090b82f204c8e19c98c
Author: Daniel Baumann <daniel at debian.org>
Date:   Thu Aug 16 15:36:30 2012 +0200

    Respecting pre-existing /etc/resolv.conf for nameserver settings in ifupdown script.

diff --git a/scripts/debconfig/0020-ifupdown b/scripts/debconfig/0020-ifupdown
index bf93edd..b6eff30 100755
--- a/scripts/debconfig/0020-ifupdown
+++ b/scripts/debconfig/0020-ifupdown
@@ -17,6 +17,14 @@ Defaults ()
 	_LO_ENABLE="${_LO_ENABLE:-true}"
 	_ETH0_METHOD="${_ETH0_METHOD:-dhcp}"
 	_ETH0_ADDRESS="${_ETH0_ADDRESS:-192.168.1.2}"
+
+	if [ -e /etc/resolv.conf ]
+	then
+		_NAMESERVER_ADDRESSES="${_NAMESERVER_ADDRESSES:-$(awk '/^nameserver / {$1=""; print $0}' /etc/resolv.conf)}"
+		_NAMESERVER_DOMAIN="${_NAMESERVER_DOMAIN:-$(awk '/^domain / {$1=""; print $0}' /etc/resolv.conf)}"
+		_NAMESERVER_SEARCH="${_NAMESERVER_SEARCH:-$(awk '/^search / {$1=""; print $0}' /etc/resolv.conf)}"
+		_NAMESERVER_OPTIONS="${_NAMESERVER_OPTIONS:-$(awk '/^options / {$1=""; print $0}' /etc/resolv.conf)}"
+	fi
 }
 
 db_get live-debconfig/ifupdown/lo-enable

-- 
live-debconfig



More information about the debian-live-changes mailing list