Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jun 2011 12:51:22 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r222681 - head/usr.sbin/bsdinstall/scripts
Message-ID:  <201106041251.p54CpM8u010785@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sat Jun  4 12:51:22 2011
New Revision: 222681
URL: http://svn.freebsd.org/changeset/base/222681

Log:
  Fix resolv.conf search list creation:
  1) do not print out an empty "search ", things do not like it.
  2) the search list is not comma separated.
  
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems

Modified:
  head/usr.sbin/bsdinstall/scripts/netconfig

Modified: head/usr.sbin/bsdinstall/scripts/netconfig
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/netconfig	Sat Jun  4 11:56:20 2011	(r222680)
+++ head/usr.sbin/bsdinstall/scripts/netconfig	Sat Jun  4 12:51:22 2011	(r222681)
@@ -173,8 +173,7 @@ exec 3>&-
 echo ${RESOLV} | tr ' ' '\n' | \
 awk '
 BEGIN {
-	search=1
-	printf "search ";
+	search=-1;
 }
 {
 	if (/^[[:space:]]+$/) {
@@ -185,8 +184,13 @@ BEGIN {
 		search=0;
 		next;
 	}
+	if (search == -1) {
+		printf "search ";
+		search=1;
+	}
 	if (search > 0) {
-		printf "%s%s", (search > 1) ? "," : "", $1;
+		printf "%s%s", (search > 1) ? " " : "", $1;
+		search++;
 		next;
 	}
 	printf "nameserver %s\n", $1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106041251.p54CpM8u010785>