aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2011-06-04 12:51:22 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2011-06-04 12:51:22 +0000
commit9ab173de82b7366cff2ca8e7c9e00d16185f24de (patch)
tree4f1e75c0f0d965418a521bfc686f38e59e06b58f /usr.sbin
parent98b4acc4c322392e4f5344c0d02acb8817e580c4 (diff)
downloadsrc-9ab173de82b7366cff2ca8e7c9e00d16185f24de.tar.gz
src-9ab173de82b7366cff2ca8e7c9e00d16185f24de.zip
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
Notes
Notes: svn path=/head/; revision=222681
Diffstat (limited to 'usr.sbin')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/netconfig10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig
index 37fe8c65dbe5..b78e33023cac 100755
--- a/usr.sbin/bsdinstall/scripts/netconfig
+++ b/usr.sbin/bsdinstall/scripts/netconfig
@@ -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;