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.
I'm not familiar with a situation where this is required - could you give a concrete example?
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.
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.
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.
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?
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.