From owner-freebsd-current@FreeBSD.ORG Wed Apr 12 17:46:36 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F37B16A407; Wed, 12 Apr 2006 17:46:36 +0000 (UTC) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED51643D58; Wed, 12 Apr 2006 17:46:30 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id k3CHkUUS021974; Wed, 12 Apr 2006 10:46:30 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k3CHkUn4021973; Wed, 12 Apr 2006 10:46:30 -0700 Date: Wed, 12 Apr 2006 10:46:30 -0700 From: Brooks Davis To: Florent Thoumie Message-ID: <20060412174630.GC21175@odin.ac.hmc.edu> References: <6eb82e0604112027q557fa36bw692f147913112997@mail.gmail.com> <200604121041.37870.jhb@freebsd.org> <20060412151816.GE28966@odin.ac.hmc.edu> <1144855989.53943.46.camel@mayday.esat.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UFHRwCdBEJvubb2X" Content-Disposition: inline In-Reply-To: <1144855989.53943.46.camel@mayday.esat.net> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-current@FreeBSD.org, Rong-En Fan , John Baldwin Subject: Re: tail, tr: not found when booting X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2006 17:46:36 -0000 --UFHRwCdBEJvubb2X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 12, 2006 at 04:33:09PM +0100, Florent Thoumie wrote: > On Wed, 2006-04-12 at 08:18 -0700, Brooks Davis wrote: > > On Wed, Apr 12, 2006 at 10:41:36AM -0400, John Baldwin wrote: > > > On Tuesday 11 April 2006 23:27, Rong-En Fan wrote: > > > > Hi, > > > >=20 > > > > I just upgraded my -currnet to today. I noticed that rc complains a= bout > > > > tail and tr not found: > > > >=20 > > > > [...] > > > > Trying to mount root from ufs:/dev/ad0s3a > > > > start_init: trying /sbin/init > > > > tail: not found > > > > tr: not found > > > > Loading configuration files. > > > > kernel dumps on /dev/ad0s3b > > > > [...] > > > >=20 > > > > The following line in rc.subr looks suspicious > > > >=20 > > > > JID=3D`ps -p $$ -o jid | tail -1 | tr -d ' '` > > > >=20 > > > > They should be replaced by absolute name as the rest command in > > > > rc.subr. :-) > > >=20 > > > You don't have tail and tr in /usr/bin? Hmm, I wonder if /usr is > > > mounted at that point, if not then rc.subr needs to be fixed. > >=20 > > You can't do anything with /usr this early. This needs to be > > moved to _find_processes() where it's actually used. I suspect it > > should also be converted to pure shell code. I think this would work: > >=20 > > for ent in `ps -p $$ -o jid`; do > > JID=3D$ent=20 > > done >=20 > Oops, indeed. I've been over-confident thinking tr/tail were in /, and > testing stop/start obviously didn't help. >=20 > I can't think of another way to do this. I've checked (at least as much as I can without an actual jail around) and the above appears to set JID correctly. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --UFHRwCdBEJvubb2X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFEPTz1XY6L6fI4GtQRAkGNAKDObr+s3khUnxBT9h8LLSxG0n+LlQCgnOet Y/MxL7JZaY027xo0q/A0sp4= =ZgUv -----END PGP SIGNATURE----- --UFHRwCdBEJvubb2X--