From owner-cvs-all@FreeBSD.ORG Mon May 21 18:51:15 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65B0916A46F; Mon, 21 May 2007 18:51:15 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id AAEC013C448; Mon, 21 May 2007 18:51:13 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 64282487F0; Mon, 21 May 2007 20:51:06 +0200 (CEST) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 65AE645696; Mon, 21 May 2007 20:50:47 +0200 (CEST) Date: Mon, 21 May 2007 20:50:32 +0200 From: Pawel Jakub Dawidek To: Doug Barton Message-ID: <20070521185032.GA1059@garage.freebsd.pl> References: <200705211144.l4LBiEHY098477@repoman.freebsd.org> <4651E084.1020605@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: <4651E084.1020605@FreeBSD.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, "Ralf S. Engelschall" , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc/rc.d hostid X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 18:51:15 -0000 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 21, 2007 at 11:10:12AM -0700, Doug Barton wrote: > Ralf S. Engelschall wrote: > >rse 2007-05-21 11:44:13 UTC > > FreeBSD src repository > > Modified files: > > etc/rc.d hostid Log: > > Adjust UUID lower-case translation from straight-forward tr(1) > > usage to an equivalent csh(1) usage as tr(1) stays in /usr/bin and > > /etc/rc.d/hostid has just the root filesystem (and this way mainly the > > tools in /bin) available. > > I've chosen csh(1) here as the string manipulation tools available in > > /bin is extremely limited and the (only) alternative ed(1) usage would > > have been a lot more complicated or even might require a temporary fil= e. > > Revision Changes Path > > 1.4 +2 -1 src/etc/rc.d/hostid > >http://www.FreeBSD.org/cgi/cvsweb.cgi/src/etc/rc.d/hostid.diff?&r1=3D1.3= &r2=3D1.4&f=3Dh >=20 > I really don't like the idea of having an rc.d script depend on csh. We d= on't have any other examples of that, and I don't really want to start down= that road. I would=20 > appreciate it if you'd do a little more research into ways that this coul= d be done with the tools available. >=20 > Meanwhile, I've attached a patch that simplifies the hostid_hardware() qu= ite a bit, and has the added virtue of only calling csh if it's needed. The main purpose of this script is to use UUID given via SMBIOS when it's valid and you just removed the code responsible for correctness checking. I also don't really see the win of using csh(1) only sometimes - you still have to use it, but now when there is a bug or will be a bug, it will be harder to identify. I'm also not happy with using csh(1), but I agree with rse@'s change in general. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ikeVEW9yuYc//A+q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGUen4ForvXbEpPzQRAsxQAJ4z0m1KnS5Got6TwxnXPSq4K3dS/ACgldOb 6MrWFSWCdp1/hnA/mfR0Xmc= =VT2y -----END PGP SIGNATURE----- --ikeVEW9yuYc//A+q--