Subject: install/21052: sysinst adds duplicate entry to /etc/hosts
To: None <gnats-bugs@gnats.netbsd.org>
From: None <bpstark@pacbell.net>
List: netbsd-bugs
Date: 04/07/2003 01:53:11
>Number:         21052
>Category:       install
>Synopsis:       sysinst adds duplicate entry to /etc/hosts
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 07 00:54:00 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Brian Stark
>Release:        NetBSD 1.6Q
>Organization:

Brian Stark
bpstark@pacbell.net
>Environment:
	
	
System: NetBSD treasure 1.6Q NetBSD 1.6Q (GENERIC) #0: Sat Apr  5 19:33:03 PST 2003  bstark@rainforest.private.net:/usr/obj/sys/arch/i386/compile.i386/GENERIC i
Architecture: i386
Machine: i386
>Description:
	
I built a NetBSD-current release using CVS sources from April 5, 2003 and 
installed NetBSD on a laptop. During the installation process, the parameters
that the user entered for the network configuration can be written to disk.
Upon rebooting the machine, I looked at /etc/hosts and noticed that there
were now two lines in the file for localhost with IPv4 address 127.0.0.1.

>How-To-Repeat:

Install NetBSD 1.6Q on a computer. When prompted during the installation if
you want to continue to use the parameters for the network, select the option
for "yes" (I don't recall the exact text or option name...). After you reboot
the computer, examine /etc/hosts. You will now see two entries for localhost 
with IPv4 address 127.0.0.1. For example, on my system, I see the following
section appended to /etc/hosts:

#
# Added by NetBSD sysinst
#
127.0.0.1       localhost
192.168.2.21    treasure.private.net treasure


The extra definition for "localhost" is not needed because further up in
the file it is already defined (both for the IPv4 and IPv6 addresses). 


>Fix:

As a work-around, just edit /etc/hosts and remove one of the duplicate 
entries.  
>Release-Note:
>Audit-Trail:
>Unformatted: