From owner-freebsd-small Mon Feb 24 10:18:30 2003 Delivered-To: freebsd-small@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9404737B401; Mon, 24 Feb 2003 10:18:27 -0800 (PST) Received: from arthur.nitro.dk (port324.ds1-khk.adsl.cybercity.dk [212.242.113.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 516C343FE3; Mon, 24 Feb 2003 10:18:26 -0800 (PST) (envelope-from simon@arthur.nitro.dk) Received: by arthur.nitro.dk (Postfix, from userid 1000) id 65B7210BF83; Mon, 24 Feb 2003 19:18:24 +0100 (CET) Date: Mon, 24 Feb 2003 19:18:24 +0100 From: "Simon L. Nielsen" To: Hiten Pandya Cc: current@FreeBSD.ORG, freebsd-small@freebsd.org Subject: Re: machdep.guessed_bootdev sysctl on i386 Message-ID: <20030224181823.GA369@nitro.dk> Mail-Followup-To: Hiten Pandya , current@FreeBSD.ORG, freebsd-small@freebsd.org References: <20030224024210.GA50286@unixdaemons.com> <4363.1046067059@critter.freebsd.dk> <20030224063502.GB70498@unixdaemons.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <20030224063502.GB70498@unixdaemons.com> User-Agent: Mutt/1.5.3i Sender: owner-freebsd-small@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2003.02.24 01:35:02 -0500, Hiten Pandya wrote: > Okay. I have attached a patch which will nuke the sysctl, and replace > it's use in picobsd's mfs_tree rc scripts with something better, but > which still needs review. I have not tested the patch, but this patch > should not fail, hopefully. PicoBSD does not necessarily have awk (actually most likely doesn't since awk is 'big'). cut could be used instead since it much smaller : mount | grep 'on / ' | cut -f 1 -d ' ' Perhaps somebody has a better way? I have cc'ed -small, since somebody there might have good idea. > Index: src/release/picobsd/mfs_tree/etc/rc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/release/picobsd/mfs_tree/etc/rc,v > retrieving revision 1.9 > diff -u -r1.9 rc > --- src/release/picobsd/mfs_tree/etc/rc 17 Nov 2002 20:19:34 -0000 1.9 > +++ src/release/picobsd/mfs_tree/etc/rc 24 Feb 2003 06:21:31 -0000 > @@ -7,7 +7,7 @@ > =20 > HOME=3D/; export HOME > PATH=3D/bin; export PATH > -dev=3D`sysctl -n machdep.guessed_bootdev` > +dev=3D`mount | grep 'on / ' | awk '{ print $1 }'` > [ -c "${dev}" ] || dev=3D"/dev/fd0" > =20 > trap "echo 'Reboot interrupted'; exit 1" 3 > Index: src/release/picobsd/mfs_tree/stand/update > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/release/picobsd/mfs_tree/stand/update,v > retrieving revision 1.5 > diff -u -r1.5 update > --- src/release/picobsd/mfs_tree/stand/update 11 Mar 2002 05:15:44 -0000 = 1.5 > +++ src/release/picobsd/mfs_tree/stand/update 24 Feb 2003 06:20:08 -0000 > @@ -5,7 +5,7 @@ > thefiles=3D$* > [ -z "$thefiles" ] && \ > thefiles=3D"/etc/rc.conf /etc/rc.firewall /etc/master.passwd" > -dev=3D`sysctl -n machdep.guessed_bootdev` > +dev=3D`mount | grep 'on / ' | awk '{ print $1 }'` > [ -c "${dev}" ] || dev=3D"/dev/fd0" > mount ${dev} /mnt > if [ "$?" !=3D "0" ] ; then [CUT] --=20 Simon L. Nielsen --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+WmHv8kocFXgPTRwRAl3mAJ44LdM+hrBMuh7RvPtlybMYp6rJTACcDoIi RUNt6kP/IFwc7LZX0oCDePM= =a8DT -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-small" in the body of the message