DHCP configuration question

Rick Stevens ricks at nerd.com
Wed Aug 26 22:20:10 UTC 2009


Philip A. Prindeville wrote:
> Ok, dumb question, but given that my
> /var/lib/dhclient/dhclient-eth0.lease info shows that I'm clearly
> getting a hostname and domain name, why does "hostname" return
> localhost.localdomain (and "domainname" returns "(none)")?
> 
> What do I need to enable to make this work?

Hostname will continue to return localhost.localdomain since, at the
time the hostname command was used in /etc/rc.d/rc.sysinit, that's
what's in the /etc/sysconfig/network file on DHCP clients.

You'd need to change the dhclient script to extract the given host name
from the leases file and do a "hostname extracted-data" to change it.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer                      ricks at nerd.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-    They say when you play a Microsoft CD backwards, you'll hear    -
-   Satanic messages, but if you play it forwards, it will install   -
-           Windows...which means Satan is in your system.           -
----------------------------------------------------------------------




More information about the fedora-list mailing list