From owner-freebsd-current@FreeBSD.ORG Wed Apr 12 15:19: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 BAC6E16A40B; Wed, 12 Apr 2006 15:19: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 422B543D6E; Wed, 12 Apr 2006 15:18:17 +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 k3CFIG2h000974; Wed, 12 Apr 2006 08:18:16 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k3CFIGqM000973; Wed, 12 Apr 2006 08:18:16 -0700 Date: Wed, 12 Apr 2006 08:18:16 -0700 From: Brooks Davis To: John Baldwin Message-ID: <20060412151816.GE28966@odin.ac.hmc.edu> References: <6eb82e0604112027q557fa36bw692f147913112997@mail.gmail.com> <200604121041.37870.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200604121041.37870.jhb@freebsd.org> 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 , flz@freebsd.org 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 15:19:36 -0000 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, > > > > I just upgraded my -currnet to today. I noticed that rc complains about > > tail and tr not found: > > > > [...] > > 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 > > [...] > > > > The following line in rc.subr looks suspicious > > > > JID=`ps -p $$ -o jid | tail -1 | tr -d ' '` > > > > They should be replaced by absolute name as the rest command in > > rc.subr. :-) > > 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. 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: for ent in `ps -p $$ -o jid`; do JID=$ent done -- Brooks