summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2006-08-30 15:14:00 +0000
committerbrooks <brooks@FreeBSD.org>2006-08-30 15:14:00 +0000
commita06320cbe1f01dc7ab687807afa089a48de92136 (patch)
treed5dc6a8357f967be1aa3f32ea888303fde568c7d /usr.sbin
parent4c70accca4d8f2bb84cda7c58cafe529f3a3c0f2 (diff)
downloadFreeBSD-src-a06320cbe1f01dc7ab687807afa089a48de92136.zip
FreeBSD-src-a06320cbe1f01dc7ab687807afa089a48de92136.tar.gz
When generating localhost entries in /etc/hosts, put localhost before
localhost.domain so that naive users of gethost* think 1:: and 127.0.0.1 are "localhost" which is what the user expects. This also matches the sample hosts file in src/etc/hosts.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sysinstall/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c
index ba8e1cd..850e9ba 100644
--- a/usr.sbin/sysinstall/config.c
+++ b/usr.sbin/sysinstall/config.c
@@ -636,8 +636,8 @@ skip:
return DITEM_FAILURE;
/* Add an entry for localhost */
if (dp) {
- fprintf(fp, "::1\t\t\tlocalhost.%s localhost\n", dp);
- fprintf(fp, "127.0.0.1\t\tlocalhost.%s localhost\n", dp);
+ fprintf(fp, "::1\t\t\tlocalhost localhost.%s\n", dp);
+ fprintf(fp, "127.0.0.1\t\tlocalhost localhost.%s\n", dp);
} else {
fprintf(fp, "::1\t\t\tlocalhost\n");
fprintf(fp, "127.0.0.1\t\tlocalhost\n");
OpenPOWER on IntegriCloud