Date: Sat, 19 Jun 1999 07:10:06 -0700 (PDT) From: John Baldwin <jobaldwi@vt.edu> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/12205: [PATCH] DHCP client does not set hostnames, and g Message-ID: <199906191410.HAA81237@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR bin/12205; it has been noted by GNATS.
From: John Baldwin <jobaldwi@vt.edu>
To: Studded <Studded@gorean.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/12205: [PATCH] DHCP client does not set hostnames, and g
Date: Sat, 19 Jun 1999 10:06:37 -0400 (EDT)
On 19-Jun-99 Studded wrote:
> jobaldwi@vt.edu wrote:
>
>> >Description:
>> The dhcp client in /usr/src/contrib/isc-dhcp does not support setting
>> hostnames. Also, it currently sets the hostname to a hexadecimal
>> representation of the hostname instead of the actual text. (Sigh.)
>
> This is really interesting. I've used my own version of the script to
set
> my hostname for years and it's never done this. How are you requesting the
> hostname in your dhcp conf file? I use the following:
>
> interface "ep0" {
> request subnet-mask, broadcast-address, routers, domain-name-servers,
> domain-name, host-name;
> require domain-name-servers;
> }
Here's my .conf file:
retry 60;
select-timeout 5;
initial-interval 2;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers;
This worked fine with older versions of the client.. it wasn't until I tried to
use the built in dhclient in /sbin that things broke. The real "bug" in this
PR is the change to tables.c.
>> >How-To-Repeat:
>> Well, you need a dhcp server setup that sends hostnames, and a client
>> that requests hostnames. Then, boot the system. The hostname will not
>> be set. Then, apply the first patch to
>> /usr/src/contrib/isc-dhcp/clients/scripts/freebsd
>> and the hostname will be set to a long, annoying, hex string.
>
> With respect, an approach like this takes into account a wider variety
of
> dhcp server implementations:
>
> if [ x$new_host_name != x ]; then
> if [ x$new_domain_name != x ]; then
> hostname $new_host_name.$new_domain_name
> echo New Hostname: $new_host_name.$new_domain_name
> else
> hostname $new_host_name
> echo New Hostname: $new_host_name
> fi
> fi
Great.. I'm not a DHCP genius, I just copied over all the hostname parts from
the script we ran with the older client/server port that was installed over a
year ago on a 2.2.7 server, so if that will work better, than by all means,
commit that sequence for setting hostnames than what I have. Thanks.
> Doug
---
John Baldwin <jobaldwi@vt.edu> -- http://members.freedomnet.com/~jbaldwin/
PGP Key: http://members.freedomnet.com/~jbaldwin/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.freebsd.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906191410.HAA81237>
