Sam Halliday said on Fri, Feb 13, 2004 at 07:22:56PM +0000: > ok, i know there have been many bugs (for some reason, all closed) > applied against this issue... but i have found no solution at all to it > in either the archives nor the bug reports, and i was wondering if > someone could help: > > i am on a DHCP-served network and the server will always give out a > hostname, but debian completely ignores that hostname; preferring > instead to use the hostname "debian" which it set up during the initial > install. > > i would like my dhcp client to set my hostname when the server sends it > to me. now i know this would be trivial to fix in a local script (for > example with dhcpcd, using -H and -D flags will set both my domainname > and hostname; and i suppose i could use a simple grep to get info from > /var/lib/dhcp/dhclient.leases when using dhclient)... what i was > wondering is if somebody could please tell me how to fix this in the > "correct debian way" and also, i would be very interested to hear why > setting the host/domainname from the DHCP server is not the default.
Something you could try (it's a bit brute force, but might work): I'm assuming you're using the ISC dhcp client version 3 (dhcp3-client). Edit /etc/dhcp3/dhclient-script and modify the part that sets up the hostname to write the hostname into /etc/hostname. That might help. I've run into the same bug; it's annoying, but I haven't had time to figure out exactly what is wrong. M
pgp00000.pgp
Description: PGP signature