From owner-dev-commits-src-main@freebsd.org Sun Jan 17 14:03:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B01084EAC85; Sun, 17 Jan 2021 14:03:05 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJc7s31q0z3FJp; Sun, 17 Jan 2021 14:03:04 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 10HE32cB058086; Sun, 17 Jan 2021 06:03:02 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 10HE32Vc058085; Sun, 17 Jan 2021 06:03:02 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202101171403.10HE32Vc058085@gndrsh.dnsmgr.net> Subject: Re: git: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a dif In-Reply-To: <3a7b249e-3a5b-d237-882d-508f7784c75b@freebsd.org> To: Stefan Esser Date: Sun, 17 Jan 2021 06:03:02 -0800 (PST) CC: rgrimes@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4DJc7s31q0z3FJp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2021 14:03:05 -0000 -- Start of PGP signed section. [ Charset windows-1252 ignored, treated as US-ASCII ] > Am 17.01.21 um 04:18 schrieb Rodney W. Grimes: > >> The branch main has been updated by glebius: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=7e4eca7136eaa35e15f67682468f09aa7127b543 > >> > >> commit 7e4eca7136eaa35e15f67682468f09aa7127b543 > >> Author: Gleb Smirnoff > >> AuthorDate: 2021-01-11 20:13:41 +0000 > >> Commit: Gleb Smirnoff > >> CommitDate: 2021-01-15 20:44:06 +0000 > >> > >> Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on > >> remote filesystems. Discussed this with Brooks and he can't find > >> evidence that provoked the change in 2005. If anything gets broken > >> I will fix it in a different way, not via rc sequence change. > > > > This is because /etc/rc.d/tmp has this line: > > if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > > > and when your doing NFS boots with seperate /usr you do not have > > /usr/bin/grep to run that line. > > > > Almost always the reason things have a REQUIRE: mountcritremote > > is that they use some commands from /usr. Critical statement, :"some commands": you fixed 1 of them, I also so a bit later: if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then mktemp lives in /usr/bin also > This dependency on /usr/bin/grep is easily removed, see: > > https://reviews.freebsd.org/D28209 > I like this fix, less dependance on /usr during boot processing is good. > diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp > index a61321e058ee..2a7205e92b59 100755 > --- a/libexec/rc/rc.d/tmp > +++ b/libexec/rc/rc.d/tmp > @@ -40,10 +40,16 @@ load_rc_config $name > > mount_tmpmfs() > { > - if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > - chmod 01777 /tmp > - fi > + while read line; do > + case $line in > + /dev/md[0-9]*\ /tmp) > + return;; > + esac > + done <<*EOF > +$(df /tmp) > +*EOF > + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > + chmod 01777 /tmp > } > > # If we do not have a writable /tmp, create a memory > -- End of PGP section, PGP failed! -- Rod Grimes rgrimes@freebsd.org