Red Hat Bugzilla – Bug 398061
wrong hostname in /etc/sysconfig/network
Last modified: 2008-01-03 23:25:00 EST
Description of problem:
I install by kickstart:
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
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.