From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 78FB3138334 for ; Mon, 9 Dec 2019 11:52:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9D7CFE0867; Mon, 9 Dec 2019 11:52:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4F06AE084E for ; Mon, 9 Dec 2019 11:52:27 +0000 (UTC) Received: from a1i15 (a1i15.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id E8B6334D7B7; Mon, 9 Dec 2019 11:52:24 +0000 (UTC) From: Ulrich Mueller To: Jaco Kroon Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH v4] mount-boot.eclass: Check if /boot is sane, but don't try to mount it. References: <9a9f76ee-56aa-e566-a539-bdb07d82501b@uls.co.za> Date: Mon, 09 Dec 2019 12:52:16 +0100 In-Reply-To: <9a9f76ee-56aa-e566-a539-bdb07d82501b@uls.co.za> (Jaco Kroon's message of "Mon, 9 Dec 2019 12:42:34 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Archives-Salt: c1594248-0a3a-46c3-8acc-9aed9c9bf66e X-Archives-Hash: 8afb8f01840def39c48798533e9862c7 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> On Mon, 09 Dec 2019, Jaco Kroon wrote: > Acked-by: Jaco Kroon OK, I can add this. >> +=C2=A0=C2=A0 =C2=A0if [[ ${EROOT:-/} !=3D / ]] ; then >> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0return 0 >> =C2=A0=C2=A0=C2=A0 =C2=A0fi > I don't use spaces in path names ... but what happens here if ROOT or > EPREFIX (and by implication EROOT) contains a space? No problem here, the test would still succeed and return 0. (But I predict that EROOT containing spaces will cause a lot of trouble elsewhere. :) > What about just checking "${EROOT}/boot" instead? For what, existence? There may well be a "boot" directory present under EROOT. (And we could check ${EROOT}/etc/fstab, but I don't think we should open that can of worms. There's no reliable way to guess the user's exact configuration for non-trivial ROOT.) Ulrich --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEZlHkP3TnuTbxrN0HwwkGhRxhwnMFAl3uNXEACgkQwwkGhRxh wnMM4Af/e1YaRCTpTWumKh8c3FhjP9gD8aIn/8qn1cdgIvTDm8USU78Kwv020EoY EHcn+CdPHkQORzWA59Zarl+z9eXncMP/eZT5pfC0sKyRyNbYjeacPKRh0dsGSFU2 KQrQ9bw1sTwj9B2CcutipKlQu6AibFBNS3OursvgvLmqnmEg6o/GCp7MpY+ZECfn 9EVMQezrMKTR+j42m71HHLaw1Cg/FngBDFNHtMGk3hCmmDZSiHO4MCBy5sEiRPiV mwk8jmO2YpbVAohEseHNW+1gFr0oPvlWTC1yPJIqpMY9ch754nfTvkMlwbOiBFLY /B8mfXQzQC1tiCNUvdN4V5jjUjNdsA== =3TtE -----END PGP SIGNATURE----- --=-=-=--