Date: Sun, 10 Oct 2010 19:37:51 +0900 From: Mamoru Iwaki <iwaki@eng.niigata-u.ac.jp> To: freebsd-stable@freebsd.org Subject: Re: How dhcp client can set its hostname properly on lease time Message-ID: <4CB1977F.8070205@eng.niigata-u.ac.jp> In-Reply-To: <4CADBF20.1040000@gmail.com> References: <4CADBF20.1040000@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Thanks everyone for giving me useful reply. Now, my stupid problem has been solved by setting 'get-lease-hostnames true;' in dhcpd.conf file. Cheers (4:59), Mamoru Iwaki wrote: > 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 -- ----- 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?4CB1977F.8070205>