On Tue, May 24, 2011 at 09:18:17PM +0200, Axel Beckert wrote: > Package: isc-dhcp-client > Version: 4.1.1-P1-17 > Severity: wishlist > > Since the inclusion of the patches in http://bugs.debian.org/609408, > dhclient always resets the hostname: > > > - fix setting of hostname in dhclient-script > > I can't remember for how long this didn't work as it was expected to > (probably since the move of /bin/sh from bash to dash), but I find the > "fixed" behaviour very annoying, especially if a hostname is already set > via /etc/hostname or I explicitly configured in /etc/dhcp/dhclient.conf > to send a hostname. > > I also don't understand why the hostname is currently always reset to > "anonhost-0263" on this machine as this isn't the hostname in the PTR > record of the IP I got via DHCP. It's also no existing other hostname in > the DNS domain I am currently in. I first suspected avahi-autoipd, but > deinstalling it didn't change this behaviour.
Look at your lease file. Is this what your DHCP server is handing out? > I currently use an exit-hook which resets the hostname to the one I > configured in /etc/hostname, but this is quite ugly as the hostname then > is changed twice on every lease renewal. If you don't request the host-name option in your dhclient.conf, you should get what you want. regards Andrew
signature.asc
Description: Digital signature