svn commit: r222681 - head/usr.sbin/bsdinstall/scripts
Bjoern A. Zeeb
bz at FreeBSD.org
Sat Jun 4 12:51:22 UTC 2011
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;
More information about the svn-src-head
mailing list