diff options
author | ume <ume@FreeBSD.org> | 2003-08-03 05:55:21 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-08-03 05:55:21 +0000 |
commit | 697f428114a3cc2de7307efefe55db5f47f41d83 (patch) | |
tree | b81a1c4388ec2fecf969503a4b6c1f01c3bbc3a0 /usr.sbin/sysinstall | |
parent | aed962b0e91a64589184a088d53bf5718c582525 (diff) | |
download | FreeBSD-src-697f428114a3cc2de7307efefe55db5f47f41d83.zip FreeBSD-src-697f428114a3cc2de7307efefe55db5f47f41d83.tar.gz |
Always put an entry for ::1. It may avoid useless DNS lookup
for localhost.
MFC after: 3 days
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r-- | usr.sbin/sysinstall/config.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index 8709798..aa8d677 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -817,16 +817,13 @@ skip: if (!fp) return DITEM_FAILURE; /* Add an entry for localhost */ - if (!variable_cmp(VAR_IPV6_ENABLE, "YES")) { - if (dp) - fprintf(fp, "::1\t\t\tlocalhost.%s localhost\n", dp); - else - fprintf(fp, "::1\t\t\tlocalhost\n"); - } - if (dp) + if (dp) { + fprintf(fp, "::1\t\t\tlocalhost.%s localhost\n", dp); fprintf(fp, "127.0.0.1\t\tlocalhost.%s localhost\n", dp); - else + } else { + fprintf(fp, "::1\t\t\tlocalhost\n"); fprintf(fp, "127.0.0.1\t\tlocalhost\n"); + } /* Now the host entries, if applicable */ if (((cp && cp[0] != '0') || (c6p && c6p[0] != '0')) && hp) { char cp2[255]; |