Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Oct 2010 21:37:52 +0900
From:      Mamoru Iwaki <1wkmmr@gmail.com>
To:        freebsd-stable@freebsd.org
Subject:   How dhcp client can set its hostname properly on lease time
Message-ID:  <4CADBF20.1040000@gmail.com>

next in thread | raw e-mail | index | archive | help
 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CADBF20.1040000>