[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dhclient and /etc/myname



On Thu, Dec 02, 2004 at 10:48:53AM +0000, John Wright wrote:
> > but as you can see, my real fqdn is 'y107.chello.upc.cz'
> > and i want that as hostname after dhclient sets up the connection.
> > isn't this sensible?
> 
> My dhclient.conf (which was created by the install script) has a request
> line.
> 
> request host-name;

Well, I use the following dhclient.conf entry to *force* hostname (even w/DHCP):

  supersede host-name "foo";

This entry goes before:

  request subnet-mask, broadcast-address, domain-name, domain-name-servers,
          routers, host-name;

The host-name in the request entry does *not* affect the supersede entry.
I got this straight out of the commented-out sample in the dhclient.conf.

All of this was documented in dhclient.conf(5):

  "supersede { [option declaration] [, ... option declaration] }
   If for some set of options the client should always use its own
   value rather than any value supplied by the server, these values
   can be defined in the supersede statement."

Hope that helps.

-Rick



Visit your host, monkey.org