From owner-dev-commits-src-main@freebsd.org Sun Jan 17 12:42:49 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 7CAC94E83DA; Sun, 17 Jan 2021 12:42:49 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJZMF2yVwz4sFt; Sun, 17 Jan 2021 12:42:49 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f211b004d54ffd5a7a53ab0.dip0.t-ipconnect.de [IPv6:2003:cd:5f21:1b00:4d54:ffd5:a7a5:3ab0]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 9B5C73FBF; Sun, 17 Jan 2021 12:42:48 +0000 (UTC) (envelope-from se@freebsd.org) To: rgrimes@freebsd.org, Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202101170318.10H3ISUj056102@gndrsh.dnsmgr.net> From: Stefan Esser 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 Message-ID: <3a7b249e-3a5b-d237-882d-508f7784c75b@freebsd.org> Date: Sun, 17 Jan 2021 13:42:45 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <202101170318.10H3ISUj056102@gndrsh.dnsmgr.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e90lrZ1nl8NGtp1vJs2VQKL5UwNGBbSlK" 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 12:42:49 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --e90lrZ1nl8NGtp1vJs2VQKL5UwNGBbSlK Content-Type: multipart/mixed; boundary="JzFqo24PD6nx34aAlTaWm6as46dA2VROr"; protected-headers="v1" From: Stefan Esser To: rgrimes@freebsd.org, Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-ID: <3a7b249e-3a5b-d237-882d-508f7784c75b@freebsd.org> 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 References: <202101170318.10H3ISUj056102@gndrsh.dnsmgr.net> In-Reply-To: <202101170318.10H3ISUj056102@gndrsh.dnsmgr.net> --JzFqo24PD6nx34aAlTaWm6as46dA2VROr Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: de-DE Content-Transfer-Encoding: quoted-printable 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=3D7e4eca7136eaa35e15f6768= 2468f09aa7127b543 >> >> 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 brok= en >> I will fix it in a different way, not via rc sequence change. >=20 > This is because /etc/rc.d/tmp has this line: > if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then >=20 > and when your doing NFS boots with seperate /usr you do not have > /usr/bin/grep to run that line. >=20 > Almost always the reason things have a REQUIRE: mountcritremote > is that they use some commands from /usr. This dependency on /usr/bin/grep is easily removed, see: https://reviews.freebsd.org/D28209 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 --JzFqo24PD6nx34aAlTaWm6as46dA2VROr-- --e90lrZ1nl8NGtp1vJs2VQKL5UwNGBbSlK Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmAEMMUFAwAAAAAACgkQR+u171r99URf pAf/QmCoceocJIk8m1qprZXJ3oNaRluEe9iPSLPnfdCGVOFMdMbLqiY0yiPCqTLH7BmnP2fpdtB+ WjwiuetY9ZbVgb7tWoq8Nls+8oHo+4NSXUXTnRqWF9IUUf03u0zmIBNXL3q+UOO24mydXmH8tx/r BQeAws62+dXP7/8YrhBzopTH9rUlJZDbTxJ0Tc5TfR7GZSQby7gFtWj0LAVr2xRPTkjvh/IM3pWk 9KvLjX19OeQ/kN2ArnglzBM2aKkUdJW3htK9zuxa06nKOWCtmD8AWIBJi5G+Gjxel5GviOsN+M02 3O0+3bFsvE2CJ3BNAkYgy1oNyUlyWLtxudQvVQE5Pg== =+oMD -----END PGP SIGNATURE----- --e90lrZ1nl8NGtp1vJs2VQKL5UwNGBbSlK--