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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to