> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Will Francis wrote:
> 
> >How can I make it such that when a machine reboots and gets a new DHCP
> >address that the hostname will reflect that change? It's been bothering
> >me for years, but now it's become a major problem.
> 
> That's an easy one, and yes, it's *$#*^% annoying.  Drop the hardcoded 
> hostname in /etc/hosts and in /etc/sysconfig/network.  And *smack* to 
> Red Hat for doing that.  

David,

I appreciate your help, but I fail to see how this will help me. Each
time the machine reboots, it may get a new IP, and therefore have a
new DNS name. I want it to change the hostname to the proper DNS name
for it's IP, not just some arbitrary name I give it. 

What I really want to know is where can I easily drop a small bit of code
in such that the hostname will be properly updated to the current DNS
resolved name of the DHCP address it was just given.

> Also, be aware that you can set your locally visible hostname to 
> anything you want in /etc/sysconfig/network, using HOSTNAME and/or 
> DHCP_HOSTNAME (depends on the Red Hat release; I set 'em both) without 
> affecting name resolution of the DHCP interface.  The specified hostname 
> will be what you see in dhcpd.leases, which is handy.

Are you suggesting that my dhcpd.leases file can give out the proper hostname?
For example, an entry from that file reads:

lease 10.98.2.22 {
        starts 1 2002/04/08 16:04:52;
        ends 1 2002/04/08 19:24:52;
        hardware ethernet 00:90:27:73:55:f9;
        client-hostname "l98-2-22.incyte.com";
}

The exact problem is that if this machines was l98-2-14 before, that is _still_
the hostname that is has and not l98-2-22 like it should have. Are you 
suggesting
I can have an entry in my /etc/sysconfig/network file that will force it to 
use the hostname given to it by the DHCP server?

Thanks

Will


> Cheers -d
> 
> - -- 
> David Talkington
> 
> PGP key: http://www.prairienet.org/~dtalk/0xCA4C11AD.pgp
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 6.5.8
> Comment: Made with pgp4pine 1.75-6
> 
> iQA/AwUBPK5QQ79BpdPKTBGtEQIx8wCg3ST3JmGBV5lLLkKzQcm5dnnKC2QAoLm0
> tfMac2ByTXnQIqyND96E3GN/
> =lJab
> -----END PGP SIGNATURE-----
> 
> 
> 
> 
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
> 




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to