From 0fffba68bd45272dcd8852234318b92482c69ff3 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Wed, 30 Aug 2006 15:14:00 +0000 Subject: [PATCH] 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. --- usr.sbin/sysinstall/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index ba8e1cd4edc7..850e9ba20edc 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -636,8 +636,8 @@ configResolv(dialogMenuItem *ditem) 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");