Bug 398061 - wrong hostname in /etc/sysconfig/network
wrong hostname in /etc/sysconfig/network
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-11-24 17:37 EST by Terje Røsten
Modified: 2008-01-03 23:25 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-01-03 23:25:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Terje Røsten 2007-11-24 17:37:43 EST
Description of problem:

I install by kickstart:

linux ks=http://webserver/ks/ks.php?hostname=<hostname>

The DHCP server gives the installing host a random IP (with name dhcp-XXX).

The php script on the webserver looks at the hostname parameter and
generate a *static* IP kickstart config for the installing host:

network --bootproto=static --ip=<?= $ip ?> --netmask=<?= $mask ?> 
--gateway=<?= $gw ?> --nameserver=<?= $dns ?> --device=eth0  --onboot=on

In Fedora 7 anaconda would resolv $ip and put in that as HOSTNAME in
/etc/sysconfig/network . In Fedora 8 the HOSTNAME is being set to the 
resolving of the random IP coming from DHCP server (dhcp-XXX).

Is this a bug? Any workaround? Maybe is better if I include the --hostname
Comment 1 David Cantrell 2008-01-03 23:25:00 EST
This is expected behavior.  If you don't provide a hostname via the --hostname
parameter, we try to figure it out using DNS resolution (if possible).  You
should be passing --hostname as well as your other parameters.

Note You need to log in before you can comment on or make changes to this bug.