From owner-freebsd-arch Tue Apr 9 19:18: 3 2002 Delivered-To: freebsd-arch@freebsd.org Received: from nothing-going-on.demon.co.uk (pc-62-31-42-140-hy.blueyonder.co.uk [62.31.42.140]) by hub.freebsd.org (Postfix) with ESMTP id E1D9637B404 for ; Tue, 9 Apr 2002 19:17:58 -0700 (PDT) Received: (from nik@localhost) by nothing-going-on.demon.co.uk (8.11.3/8.11.3) id g39JY3018631; Tue, 9 Apr 2002 20:34:03 +0100 (BST) (envelope-from nik) Date: Tue, 9 Apr 2002 20:34:03 +0100 From: Nik Clayton To: Luigi Rizzo Cc: Nate Williams , arch@FreeBSD.ORG Subject: Re: proposed code: automatic setting of hostname from MAC address Message-ID: <20020409203403.U30474@canyon.nothing-going-on.org> References: <20020407035941.B37911@iguana.icir.org> <15538.12905.744914.71228@caddis.yogotech.com> <20020408235226.B57765@iguana.icir.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="5Dr6Wqe9hdyl7LAI" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020408235226.B57765@iguana.icir.org>; from rizzo@icir.org on Mon, Apr 08, 2002 at 11:52:26PM -0700 Organization: FreeBSD Project Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --5Dr6Wqe9hdyl7LAI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 08, 2002 at 11:52:26PM -0700, Luigi Rizzo wrote: > Nate, probably i did not explain it clearly. > s Garance says, the code i am proposing lets you use the same > configuration file (/etc/rc.conf) on multiple machines, instead > of having to customise it for each one. >=20 > The call to auto_set_hostname() in rc.conf will fetch the MAC address > from the first ethernet card, look it up in a database of > MAC<->hostname pairs (/etc/ethers, or /etc/hosts), and sets the > "hostname" and "ifconfig_foo0" shell variables accordingly. From > there on, rc.conf is absolutely the same as usual. Why not do this in /etc/rc.conf.local, which can be local to each=20 machine, with /etc/rc.conf being sitewide? I've done that before and it works well. N --=20 FreeBSD: The Power to Serve http://www.freebsd.org/ (__) FreeBSD Documentation Project http://www.freebsd.org/docproj/ \\\'',) \/ \= ^ --- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- .\._/= _) --5Dr6Wqe9hdyl7LAI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjyzQioACgkQk6gHZCw343VWzACdHKsk4YcSzxypGITpWz6WMxCP /IgAni8mVcw3pFgnFutDc5arMX9tduhH =VF6c -----END PGP SIGNATURE----- --5Dr6Wqe9hdyl7LAI-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message