Bug 70479

Summary: RFE: accept list of hostnames in network --hostname
Product: [Retired] Red Hat Linux Reporter: Alexandre Oliva <aoliva>
Component: anacondaAssignee: Jeremy Katz <katzj>
Status: CLOSED WONTFIX QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: low    
Version: 8.0Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-05 02:46:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexandre Oliva 2002-08-01 17:20:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020722

Description of problem:
Currently, a single hostname is accepted, that becomes the primary hostname of
the machine in /etc/sysconfig/network and an alias for localhost.localdomain and
localhost in /etc/hosts.  It would be nice if more than one hostname could be
specified, for example, to have the machine name be an unqualified name, but
still have a FQDN alias introduced in /etc/hosts.  For example: --hostname "free
free.f.q.dn".  Alternatively, there could be an option to tell the installer to
store the unqualified domain name in sysconfig/network, even if the fqdn is
listed in --hostname.

Comment 1 Michael Fulbright 2002-08-02 16:21:46 UTC
I'm not familiar with a situation where this is required - could you give a
concrete example?

Comment 2 Alexandre Oliva 2002-08-02 17:05:36 UTC
sendmail, for example, wants to find a FQDN in /etc/hosts otherwise it assumes
the domain name is localdomain and doesn't deliver e-mail properly.  SSH with a
.ssh/config that maps short names to FQDN ones also wins when the FQDN is in
/etc/hosts.

However, to have a FQDN as the default hostname means the login screen and
`uname -n' will display the FQDN.  When it's free.redhat.lsd.ic.unicamp.br, it
gets ugly.

So I'd like the short version of the domain name to be the primary host name
(which makes sense for a laptop, that can be plugged to different networks, but
still be able to keep its name), but still have an alias in /etc/hosts for the FQDN.

Comment 3 Dax Kelson 2002-08-04 21:45:23 UTC
FYI:

This is really a short-coming of IPv4. In the IPX world, each server has an
"internal address", from which all out-bound traffic is sourced from. This
provides consistency on a multihomed server.

In Solaris, there is a /etc/inet/ipnodes file that contains the "official" name
of the machine regardless of what IP addresses are currently being used. This is
also known as the canonical name of the machine.

Comment 4 Alexandre Oliva 2002-08-04 22:07:45 UTC
The official name is precisely what goes in /etc/sysconfig/network.  It also
shows up in /etc/hosts as an alias to localhost.  What I'm asking for is an easy
way to add more aliases to localhost in /etc/hosts.

Comment 5 Alexandre Oliva 2003-02-19 05:14:41 UTC
Still present in phoebe.  I got problems starting squid, and e-mail delivery
problems, in kickstart installs that set the hostname to a non-FQDN name. 
Leaving the hostname set to localhost.localdomain in /etc/sysconfig/network
seemed to work, as is the case when not setting hostname explicitly, but then I
get the FQDN obtained from the DHCP server as the hostname.  Maybe I should
tweak the DHCP server configuration?

Comment 6 Jeremy Katz 2004-10-05 02:46:44 UTC
If you want to do things like this, %post is present for this sort of
tweaking.  Not going to implement something like this in the normal case.