Bug 398061 - wrong hostname in /etc/sysconfig/network
Summary: wrong hostname in /etc/sysconfig/network
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-24 22:37 UTC by Terje Røsten
Modified: 2008-01-04 04:25 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-01-04 04:25:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Terje Røsten 2007-11-24 22:37:43 UTC
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
parameter?

Comment 1 David Cantrell 2008-01-04 04:25:00 UTC
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.