summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2011-06-04 12:51:22 +0000
committerbz <bz@FreeBSD.org>2011-06-04 12:51:22 +0000
commit9723861d87ecf52c81dcb461b5406eec139e4dc5 (patch)
tree4f1e75c0f0d965418a521bfc686f38e59e06b58f /usr.sbin/bsdinstall
parentc361b3f42cc6af470945bfed707cf64e4414e1d8 (diff)
downloadFreeBSD-src-9723861d87ecf52c81dcb461b5406eec139e4dc5.zip
FreeBSD-src-9723861d87ecf52c81dcb461b5406eec139e4dc5.tar.gz
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
Diffstat (limited to 'usr.sbin/bsdinstall')
-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 37fe8c6..b78e330 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;
OpenPOWER on IntegriCloud