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

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


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

    Making the 'domain', 'search', and 'options' options available in ifupdown script.

diff --git a/scripts/debconfig/0020-ifupdown b/scripts/debconfig/0020-ifupdown
index 84178b3..144e06f 100755
--- a/scripts/debconfig/0020-ifupdown
+++ b/scripts/debconfig/0020-ifupdown
@@ -49,6 +49,15 @@ _ETH0_NETWORK="${RET}" # string (w/ empty)
 db_get live-debconfig/ifupdown/nameserver-addresses
 _NAMESERVER_ADDRESSES="${RET}" # string (w/ empty)
 
+db_get live-debconfig/ifupdown/nameserver-domain
+_NAMESERVER_DOMAIN="${RET}" # string (w/ empty)
+
+dg_get live-debconfig/ifupdown/nameserver-search
+_NAMESERVER_SEARCH="${RET}" # string (w/ empty)
+
+db_get live-debconfig/ifupdown/nameserver-options
+_NAMESERVER_OPTIONS="${RET}" # string (w/ empty)
+
 Defaults
 
 db_set live-debconfig/ifupdown/lo-enable "${_LO_ENABLE}"
@@ -81,6 +90,15 @@ db_fset live-debconfig/ifupdown/eth0-network seen false
 db_set live-debconfig/ifupdown/nameserver-addresses "${_NAMESERVER_ADDRESSES}"
 db_fset live-debconfig/ifupdown/nameserver-addresses seen false
 
+db_set live-debconfig/ifupdown/nameserver-domain "${_NAMESERVER_DOMAIN}"
+db_fset live-debconfig/ifupdown/nameserver-domain seen false
+
+db_set live-debconfig/ifupdown/nameserver-search "${_NAMESERVER_SEARCH}"
+db_fset live-debconfig/ifupdown/nameserver-search seen false
+
+db_set live-debconfig/ifupdown/nameserver-options "${_NAMESERVER_OPTIONS}"
+db_fset live-debconfig/ifupdown/nameserver-options seen false
+
 db_settitle live-debconfig/title
 db_input high live-debconfig/ifupdown/lo-enable || true
 db_go
@@ -181,6 +199,15 @@ _ETH_NUMBER="${_NUMBER}"
 db_get live-debconfig/ifupdown/nameserver-addresses
 _NAMESERVER_ADDRESSES="${RET}" # string (w/ empty)
 
+db_get live-debconfig/ifupdown/nameserver-domain
+_NAMESERVER_DOMAIN="${RET}" # string (w/ empty)
+
+db_get live-debconfig/ifupdown/nameserver-search
+_NAMESERVER_SEARCH="${RET}" # string (w/ empty)
+
+db_get live-debconfig/ifupdown/nameserver-options
+_NAMESERVER_OPTIONS="${RET}" # string (w/ empty)
+
 Defaults
 
 db_stop
@@ -282,17 +309,31 @@ EOF
 done
 
 # Create /etc/resolv.conf
-if [ -n "${_NAMESERVER_ADDRESSES}" ]
+rm -f /etc/resolv.conf
+
+if [ -n "${_NAMESERVER_DOMAIN}" ]
 then
-	grep -Ev '^ *nameserver' /etc/resolv.conf > /etc/resolv.conf.tmp
-	mv /etc/resolv.conf.tmp /etc/resolv.conf
+	echo "domain ${_NAMESERVER_DOMAIN}" >> /etc/resolv.conf
+fi
+
+if [ -n "${_NAMESERVER_SEARCH}" ]
+then
+	echo "search ${_NAMESERVER_SEARCH}" >> /etc/resolv.conf
+fi
 
+if [ -n "${_NAMESERVER_ADDRESSES}" ]
+then
 	for _NAMESERVER_ADDRESS in $(echo ${_NAMESERVER_ADDRESSES} | sed -e 's|,| |g')
 	do
 		echo "nameserver ${_NAMESERVER_ADDRESS}" >> /etc/resolv.conf
 	done
 fi
 
+if [ -n "${_NAMESERVER_OPTIONS}" ]
+then
+	echo "options ${_NAMESERVER_OPTIONS}" >> /etc/resolv.conf
+fi
+
 # Create /etc/hosts
 case "${_ETH0_METHOD}" in
 	none|dhcp)
diff --git a/scripts/debconfig/0020-ifupdown.templates b/scripts/debconfig/0020-ifupdown.templates
index aa71686..7359908 100644
--- a/scripts/debconfig/0020-ifupdown.templates
+++ b/scripts/debconfig/0020-ifupdown.templates
@@ -83,8 +83,38 @@ Description: live-debconfig: Ethernet Network Address?
 
 Template: live-debconfig/ifupdown/nameserver-addresses
 Type: string
-Default: 192.168.1.1
+Default:
 Description: live-debconfig: Nameserver Addresses?
  What should be the IP addresses of the nameservers of the current system?
  .
  This defaults to empty. Multiple nameservers can be separated by whitespace.
+
+Template: live-debconfig/ifupdown/nameserver-domain
+Type: string
+Default:
+Description: live-debconfig: Nameserver Local Domain Name?
+ What should be local domain name used for name resolution?
+ .
+ See resolv.conf(5) for more information about the 'domain' option.
+ .
+ This defaults to empty.
+
+Template: live-debconfig/ifupdown/nameserver-search
+Type: string
+Default:
+Description: live-debconfig: Nameserver Search List?
+ What should be search list for hostname lookups?
+ .
+ See resolv.conf(5) for more information about the 'search' option.
+ .
+ This defaults to empty.
+
+Template: live-debconfig/ifupdown/nameserver-options
+Type: string
+Default:
+Description: live-debconfig: Nameserver Resolver Options?
+ What should be the resolver options?
+ .
+ See resolv.conf(5) for more information about the 'options' option.
+ .
+ This defaults to empty.

-- 
live-debconfig



More information about the debian-live-changes mailing list