From nobody@FreeBSD.org  Thu Feb 28 03:12:23 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id B522237B400
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 28 Feb 2002 03:12:22 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g1SBCMZ76369;
	Thu, 28 Feb 2002 03:12:22 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200202281112.g1SBCMZ76369@freefall.freebsd.org>
Date: Thu, 28 Feb 2002 03:12:22 -0800 (PST)
From: Michael Wardle <michael@endbracket.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: sysinstall could improve manipulation of /etc/hosts
X-Send-Pr-Version: www-1.0

>Number:         35400
>Category:       bin
>Synopsis:       sysinstall(8): sysinstall could improve manipulation of /etc/hosts
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-sysinstall
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 28 03:20:01 PST 2002
>Closed-Date:    
>Last-Modified:  Sat Jun 29 05:53:13 UTC 2013
>Originator:     Michael Wardle
>Release:        4.5
>Organization:
-
>Environment:
FreeBSD 4.5-RELEASE i386
>Description:
My /etc/hosts file (seemingly generated by /stand/sysinstall during 
installation) contains this:
127.0.0.1     localhost
192.168.1.4   water
192.168.1.4   water.

(note the final line has a terminal dot/period, as i don't have a
 domain on my home network)

This causes some utilities (such as sendmail) to fail, as it can't
resolve my fully-qualified domain name (FQDN), presumably (at least
in part) because it finds the first entry matching my IP/hostname
and then gives up.

This can be overcome with an entry more like this:
127.0.0.1 localhost.localdomain localhost
192.161.1.4 water. water

Where the format is:
IP address number | full hostname + domain | short hostname/aliases

This seems to be the more common format (as alluded to in hosts(5)),
and more things work correctly if this format is used.

If sysinstall does not currently do this (perhaps it's a special case
for a null domain), it should be updated to use the suggested /etc/hosts
format.

>How-To-Repeat:
      
>Fix:
      
>Release-Note:
>Audit-Trail:

From: Makoto Matsushita <matusita@jp.FreeBSD.org>
To: michael@endbracket.net
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/35400: sysinstall could improve manipulation of /etc/hosts
Date: Fri, 01 Mar 2002 17:29:00 +0900

 michael> If sysinstall does not currently do this (perhaps it's a
 michael> special case for a null domain), it should be updated to use
 michael> the suggested /etc/hosts format.
 
 What "use the suggested /etc/hosts format" mean?  IMHO, I *don't*
 think that followings are good ideas:
 
 1) if user doesn't specify domainname, sysinstall assumes that
    pre-defined default domainname, say "youdontsetyourdomainname.org",
    is selected.
 	-- because it makes another trouble if you really want to
 	   leave domainname empty.
 	-- because any domainname will match other's domainname.
 
 2) if user doesn't specify domainname, sysinstall warns with a dialog
    that "you have to set a domain-part of your hostname."
 	-- because it makes another trouble if you really want to
 	   leave domainname empty.
 	-- because novice user will confuse such dialogs.
 
 Do you have any other idea about that?
 
 -- -
 Makoto `MAR' Matsushita

From: Michael Wardle <michael@endbracket.net>
To: Makoto Matsushita <matusita@jp.FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/35400: sysinstall could improve manipulation of /etc/hosts
Date: Fri, 1 Mar 2002 15:05:16 -0800 (PST)

 --- Makoto Matsushita <matusita@jp.FreeBSD.org> wrote:
 > 
 > michael> If sysinstall does not currently do this (perhaps it's a
 > michael> special case for a null domain), it should be updated to use
 > michael> the suggested /etc/hosts format.
 > 
 > What "use the suggested /etc/hosts format" mean?
 
 The format hosts(5) mentions (not very clearly, tho) is
 IP number | full host name | short host name/aliases
 
 > IMHO, I *don't* think that followings are good ideas:
 > 
 > 1) if user doesn't specify domainname, sysinstall assumes that
 >    pre-defined default domainname, is selected.
 >
 > 2) if user doesn't specify domainname, sysinstall warns with a dialog
 >    that "you have to set a domain-part of your hostname."
 
 I think I entered an empty domain for my home network, and it asked me
 whether I would like to add an entry with a terminal dot, so it's
 already doing something similar.
 
 When it does do this, I am saying it should put both the FQDN (i.e.
 host name with terminal dot) and the short host name on the same line
 in /etc/hosts.  If sysinstall builds /etc/hosts lines in other
 situations, I would suggest we make sure it's putting the full host
 name
 and the short host name on the same line, rather than separate lines
 for each.
 
 Sorry to be so vague.
 
 
 __________________________________________________
 Do You Yahoo!?
 Yahoo! Greetings - Send FREE e-cards for every occasion!
 http://greetings.yahoo.com
Responsible-Changed-From-To: freebsd-bugs->qa 
Responsible-Changed-By: kris 
Responsible-Changed-When: Fri Jul 18 15:54:39 PDT 2003 
Responsible-Changed-Why:  
Assign to qa team 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35400 
Responsible-Changed-From-To: freebsd-bugs->randi 
Responsible-Changed-By: randi 
Responsible-Changed-When: Sat Jun 6 19:45:04 UTC 2009 
Responsible-Changed-Why:  
Taking this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35400 
Responsible-Changed-From-To: randi->freebsd-sysinstall 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jun 29 05:52:04 UTC 2013 
Responsible-Changed-Why:  
back to mailing list. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35400 
>Unformatted:
