On 28-Jan-00 Mike Smith wrote:
>> On Thu, Jan 27, 2000 at 04:20:54PM -0800, Mike Smith wrote:
>> >
>> > Actually, the problem here is that our dhclient doesn't pick the hostname
>> > up the first time around. If it's set in an existing lease that is just
>> > confirmed, it works, but if you're starting without a lease, you won't
>> > get a hostname set (but it will be in the lease file, so if you restart
>> > before the lease expires you're OK).
>>
>> Are you sure? In the case I know you experience, the server changed its
>> behavior WRT handing out hostnames. I don't doubt that such a switch
>> mid-stream in using DHCP would confuse things.
>
> Quite sure. I have several machines installed with the 26th snapshot
> that aren't setting the hostname correctly. You were present when the
> hostname issuing from the server problem was fixed, and the clients were
> still not picking them up then.
>
>> > Personally I'd prefer to just fix the DHCP client so that it correctly
>> > sets the hostname as obtained from the server...
>>
>> Nope. Poll larger shops first on their DHCP usage.
>
> Correct behaviour would be not to set the hostname unless:
>
> a) it is not already set
> or
> b) it was previously set by the DHCP client
>
> You could probably ignore b) and satisfy most people. At the moment, the
> hostname is _never_ set by the DHCP client _unless_ it finds a lease that
> is still valid. This is clearly a bug.
Uh, no. It is set ok on the initial bootup. The lab of 30 or so FreeBSD
machines I run at school use DHCP to get their hostnames and the current
dhclient-script works perfectly:
[0:28:21] (ttyp2) jobaldwi@raspberry:~
> grep hostname
/etc/rc.conf
hostname=""
[0:28:27] (ttyp2) jobaldwi@raspberry:~
> grep host-name /var/db/dhclient.leases
option host-name "raspberry.cslab.vt.edu";
option host-name "raspberry.cslab.vt.edu";
option host-name "raspberry.cslab.vt.edu";
option host-name "raspberry.cslab.vt.edu";
option host-name "raspberry.cslab.vt.edu";
option host-name "raspberry.cslab.vt.edu";
option host-name "raspberry.cslab.vt.edu";
--
John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message