Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Apr 2006 10:46:30 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Florent Thoumie <flz@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, Rong-En Fan <grafan@gmail.com>, John Baldwin <jhb@FreeBSD.org>
Subject:   Re: tail, tr: not found when booting
Message-ID:  <20060412174630.GC21175@odin.ac.hmc.edu>
In-Reply-To: <1144855989.53943.46.camel@mayday.esat.net>
References:  <6eb82e0604112027q557fa36bw692f147913112997@mail.gmail.com> <200604121041.37870.jhb@freebsd.org> <20060412151816.GE28966@odin.ac.hmc.edu> <1144855989.53943.46.camel@mayday.esat.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060412174630.GC21175>