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

Re: dhclient and /etc/myname



hmm, on Thu, Dec 02, 2004 at 10:48:53AM +0000, John Wright said that
> But I have the impression that /sbin/dhclient-script would probably set the
> hostname and I don't see any code to do that and grep can't find sethostname
> in usr.sbin/dhcp/**.

i think you mean 'hostname' and not 'sethostname'.
no, it seems that it does not, and this is precisely what i am looking for.

and because this hostname can be different every time i turn on the
router, i would like to make it as automatic as possible.

the only thing coming to my mind right now is getting
the dhcp ip using ifconfig, dns query it and set that
name using hostname.  or i could get the ip from the lease file
in /var/db/

but this seems very cumbersome to me, and ugly as hell.
interestingly, the lease files do not contain the host-name,
only the domain-name....

does anyone has any other idea?

-f
-- 
windows error: 004 erroneous error.  nothing wrong.



Visit your host, monkey.org