Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jun 1999 02:20:03 -0700 (PDT)
From:      Studded <Studded@gorean.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/12205: [PATCH] DHCP client does not set hostnames, and garbles  them as well
Message-ID:  <199906190920.CAA88423@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: Studded <Studded@gorean.org>
To: jobaldwi@vt.edu
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/12205: [PATCH] DHCP client does not set hostnames, and garbles 
 them as well
Date: Sat, 19 Jun 1999 02:16:02 -0700

 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;
 }
 
 
 > >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
 
 Doug
 


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?199906190920.CAA88423>