From owner-freebsd-questions@FreeBSD.ORG Mon Mar 22 22:11:04 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10CD9106564A for ; Mon, 22 Mar 2010 22:11:04 +0000 (UTC) (envelope-from norgaard@locolomo.org) Received: from mail.locolomo.org (97.pool85-48-194.static.orange.es [85.48.194.97]) by mx1.freebsd.org (Postfix) with ESMTP id BA7E48FC0A for ; Mon, 22 Mar 2010 22:11:03 +0000 (UTC) Received: from beta.local (ppp-88-217-17-18.dynamic.mnet-online.de [88.217.17.18]) by mail.locolomo.org (Postfix) with ESMTPSA id D4FEC1C0871 for ; Mon, 22 Mar 2010 23:11:01 +0100 (CET) Message-ID: <4BA7EAF3.6050208@locolomo.org> Date: Mon, 22 Mar 2010 23:10:59 +0100 From: Erik Norgaard User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <5e91cf2e1003221335x4afb161ib9fd565b97beb20a@mail.gmail.com> In-Reply-To: <5e91cf2e1003221335x4afb161ib9fd565b97beb20a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: diskless & dhclient X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2010 22:11:04 -0000 On 22/03/10 21:35, Mats Lindberg wrote: > I've tried to get my freebsd diskless system to get hold of some of the > dhcp-options. > E.g. my dhcp-server will always be the nfs-server as well. So I was hoping > to create the /etc/fstab with the the dhcpd's ip as the nfs server. > Thus not needing to have the hard coded nfsroot:/conf/'ip-address'/etc. > Instead i'm looking for having almost all necessary files in the > nfsroot:/conf/base/etc directory. you only need /conf/'ip-address' if you need different configurations for different clients. The ip-address is that of the diskless client, not the server. > I've tried to set ifconfig_ETHDEV="DHCP" in /etc/rc.conf and creating a > bourne shell script /etc/dhclient_enter_hooks, but as far as I can detect > the script is never run. > > I guess since the kernel already got the ip-address during pxeboot it does > not care about renewing the ip-address, or?? No, when the client detects it is a diskless client, /etc/rc.initdiskless is executed. See documentation in that file. Anyway, iirc you can find the dhcp options with kenv(1). BR, Erik -- Erik Nørgaard Ph: +34.666334818/+34.915211157 http://www.locolomo.org