Re: Problem with DHCP, /etc/hosts and GNOME

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



William Hooper wrote:

Satish Balay said:



Ah.. I interptered it as - an option to dhcp-clinet (not server) to
ignore what dhcp server says - and use the provided value as the
hostname. Perhpas there should be some other option for this
functionality? (RFE)

I don't like hostname changing (when you move laptop between networks)
- this changes xauth which messes up everything else..



A quick browse through the networking scripts suggests that the hostname
will only change if it is "localhost". I haven't looked too hard though. I know that I don't have a problem with my laptop, which I set the
hostname on during install (but that was with RHL 9 and an upgrade to
FC1). It may be more of a case of the DHCP servers I'm using not trying
to change the hostname, though.





It's in the /etc/sysconfig/network-scripts/network-functions script. There is a function called need_hostname().

Returns 0 if the current hostname is "localhost", "localhost.localdomain" or "(none)". Returns 1 otherwise. This function is called in the /etc/sysconfig/network-scripts/ifup script. However, again, just like everything else, just because the DHCP client *requests* a hostname, does not mean that the DHCP server is obliged to hand one back...

HTH...

--
Keven Ring               | "Oh no,  Not Again..."
The MITRE Corporation    |   Bowl of Petunias -
7515 Colshire Drive      |   The Hitchhikers Guide to the Galaxy
McLean VA 22102-7508     |
PH: (703)883-7026        |





[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux