From owner-freebsd-stable@FreeBSD.ORG Thu Oct 7 15:14:49 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70EC9106566B for ; Thu, 7 Oct 2010 15:14:49 +0000 (UTC) (envelope-from reichert@numachi.com) Received: from meisai.numachi.com (meisai.numachi.com [198.175.254.6]) by mx1.freebsd.org (Postfix) with SMTP id D5ADC8FC1D for ; Thu, 7 Oct 2010 15:14:48 +0000 (UTC) Received: (qmail 65618 invoked by uid 1001); 7 Oct 2010 15:14:46 -0000 Date: Thu, 7 Oct 2010 11:14:46 -0400 From: Brian Reichert To: Mamoru Iwaki <1wkmmr@gmail.com> Message-ID: <20101007151446.GH67344@numachi.com> References: <4CADBF20.1040000@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CADBF20.1040000@gmail.com> User-Agent: Mutt/1.5.9i Cc: freebsd-stable@freebsd.org Subject: Re: How dhcp client can set its hostname properly on lease time X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2010 15:14:49 -0000 On Thu, Oct 07, 2010 at 09:37:52PM +0900, Mamoru Iwaki wrote: > Now, my question is > > Are there good way for dhcp client to set its hostname properly on lease > time? Depends on 'properly'. I've hacked dhclient exit scripts to synthesize a hostname, if one was not offered by the DHCP server. The host, under these circumstances, gets a hostname derived from the IP address and the supplied domain name, eg: '10-12-34-56.example.com'. This at least gets the box into a place where it has a hostname associated with the address on an external interface. No one else knows that hostname, however. YMMV. > > Cheers > > -- > ----- > Mamoru IWAKI > Grad. Schl. Sci & Tech./Dept. Biocybernetics, Niigata University -- Brian Reichert 55 Crystal Ave. #286 Derry NH 03038-1725 USA BSD admin/developer at large