From owner-freebsd-current@FreeBSD.ORG Tue Jan 20 07:59:34 2004 Return-Path: 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 813CD16A4CE for ; Tue, 20 Jan 2004 07:59:34 -0800 (PST) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9C8A43D83 for ; Tue, 20 Jan 2004 07:59:27 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.3) with ESMTP id i0KFxCaT006275; Tue, 20 Jan 2004 07:59:12 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i0KFxCbU006274; Tue, 20 Jan 2004 07:59:12 -0800 Date: Tue, 20 Jan 2004 07:59:12 -0800 From: Brooks Davis To: Ruben de Groot Message-ID: <20040120155912.GA18837@Odin.AC.HMC.Edu> References: <98643.1074545359@critter.freebsd.dk> <20040120090953.GA25898@ei.bzerk.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <20040120090953.GA25898@ei.bzerk.org> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu cc: Poul-Henning Kamp cc: current@freebsd.org Subject: Re: REVIEW: cleanvar.patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 20 Jan 2004 15:59:34 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 20, 2004 at 10:09:53AM +0100, Ruben de Groot wrote: > On Mon, Jan 19, 2004 at 09:49:19PM +0100, Poul-Henning Kamp typed: >=20 > [...] >=20 > > +# If we do not have a writable /var, create a memory > > +# filesystem for /var. We don't have /usr yet so > ^^^^^^^^^^^^^^^^^^^ > > +# use mkdir instead of touch to test. We want mount > > +# to record its mounts so we have to make sure /var/db > > +# exists before doing the mount -a. > > +# > > + > > +if (/bin/mkdir /var/.diskless 2> /dev/null); then > > + rmdir /var/.diskless > > +else > > + mkdir -p /var > > + mount_md ${varsize:=3D32m} /var > > +fi > > + > > +# Populate /var if it looks empty > > +if [ -d /var/run -a -d /var/db -a -d /var/empty ] ; then > > + true > > +else > > + /usr/sbin/mtree -deU -f /etc/mtree/BSD.var.dist -p /var > /dev/null 2= >&1 > ^^^^^^^^^^^^^^^ > Where did we get /usr ? In rc.d/diskless, we run a mount -a before we get here which would be inappropriate in this case. In most cases we do have /usr since this comes after mountcritlocal which mounts all local file systems. Only the case of a remote /usr seperate from / doesn't work here. I think there's some argument that we should move mtree and possiably newsyslog to /sbin to support the population of /var. -- 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 --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFADVBPXY6L6fI4GtQRAjELAJ0WSCgI9KqRd42EO4AnLu3wO1/XYQCg0v5W yj5ZE91CYGCquzNjHVq/2fk= =f59Y -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR--