How dhcp client can set its hostname properly on lease time
Mamoru Iwaki
1wkmmr at gmail.com
Thu Oct 7 13:01:56 UTC 2010
Hi,
I'm using FreeBSD 8 stable as of 20101006. It is a dhcp client in a
private local network, and xorg staff is installed. When I tried to use
it from a remote pc with X11-forwarding set, xauth failed to set up
.Xauthority as follows.
/usr/local/bin/xauth: creating new authority file /home/hogehoge/.Xauthority
/usr/local/bin/xauth: (stdin):1: bad display name "unix:10.0" in
"remove" command
/usr/local/bin/xauth: (stdin):2: bad display name "unix:10.0" in "add"
command
At this moment, hostname was not set (it's empty) because the FreeBSD
box was a dhcp client. Meanwhile, if the hostname coresponding to the
ip-address assigned by dhcp server was set manually, the above lines
disappeared and X11-forwarding worked well.
Now, my question is
Are there good way for dhcp client to set its hostname properly on lease
time?
The following will be a possble workaround, but I'm wondering there can
be a smart answer in FreeBSD itself.
It is possible to resolve the hostname corresponding to a dhcp-delivered
ip-address with a local name server. So, (1) resolve the corresponding
hostname from the local name server, (2) set it as hostname, and (3)
call them every time when dhcp lease is updated
Cheers
--
-----
Mamoru IWAKI
Grad. Schl. Sci & Tech./Dept. Biocybernetics, Niigata University
More information about the freebsd-stable
mailing list