Subject: install/21999: localhost.domain not correctly set in /etc/hosts file
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/26/2003 20:31:53
>Number:         21999
>Category:       install
>Synopsis:       localhost.domain not correctly set in /etc/hosts file
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 26 20:32:00 UTC 2003
>Originator:     william allen simpson
>Release:        1.6U
NetBSD dreamer 1.6U NetBSD 1.6U (GENERIC) #1: Wed Jun 25 10:42:39 EDT 2003  current@dreamer:/usr/obj/sys/arch/i386/compile/GENERIC i386
In a default install, the search order for root@localhost looks for 
localhost.domain before localhost.

The default hosts file comes with a localhost line.

The sysinst adds a obviously unneccessary duplicate localhost line, 
that probably should be localhost.domain:
#       $NetBSD: hosts,v 1.6 2000/08/15 09:33:05 itojun Exp $
::1                     localhost               localhost
# Added by NetBSD sysinst
#       localhost dreamer

(1) install a clean system


write_etc_hosts(FILE *f)

        scripting_fprintf(f, " localhost\n");

should be:

        l = strlen(net_domain);
        if (l > 0) {
              scripting_fprintf(f, " localhost.%s\n", net_domain );