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 96049138334 for ; Tue, 16 Jul 2019 20:30:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D89E1E07A5; Tue, 16 Jul 2019 20:30:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 7FD04E07A5 for ; Tue, 16 Jul 2019 20:30:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 29258347DBB for ; Tue, 16 Jul 2019 20:30:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AF3C76D5 for ; Tue, 16 Jul 2019 20:30:35 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1563308955.cb6dccf51bf2ae325c962febb48158f705f4c34c.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/linuxrc X-VCS-Directories: defaults/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: cb6dccf51bf2ae325c962febb48158f705f4c34c X-VCS-Branch: master Date: Tue, 16 Jul 2019 20:30:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5c85fe53-63f0-4313-9fb4-b63de797f159 X-Archives-Hash: 90f9de96449184b5c706aa5e2315616b commit: cb6dccf51bf2ae325c962febb48158f705f4c34c Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Jul 16 20:26:14 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Jul 16 20:29:15 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=cb6dccf5 linuxrc: Tell user why we consider a root device as invalid Bug: https://bugs.gentoo.org/520018 Signed-off-by: Thomas Deutschmann gentoo.org> defaults/linuxrc | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/defaults/linuxrc b/defaults/linuxrc index 6b69a13..99874a6 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -786,17 +786,41 @@ do # else not a good root and start over. if [ "${mountret}" = '0' ] then - if [ -x "${NEW_ROOT}${REAL_INIT:-/sbin/init}" ] \ - || [ -L "${NEW_ROOT}${REAL_INIT:-/sbin/init}" -o -x "${NEW_ROOT}/bin/sh" ] \ - || [ "${REAL_ROOT}" = "/dev/nfs" ] + if [ -x "${NEW_ROOT}${REAL_INIT:-/sbin/init}" ] then break else - bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again" - got_good_root=0 + warn_msg "${NEW_ROOT}${REAL_INIT:-/sbin/init} was not found or is not executable, maybe a symlink?" ${QUIET} fi + + if [ -L "${NEW_ROOT}${REAL_INIT:-/sbin/init}" ] + then + good_msg "Symlink detected! Assuming split /usr ..." ${QUIET} + break + else + warn_msg "${NEW_ROOT}${REAL_INIT:-/sbin/init} is not a symlink, do we have at least /bin/sh?" ${QUIET} + fi + + if [ -x "${NEW_ROOT}/bin/sh" ] + then + good_msg "Executable ${NEW_ROOT}/bin/sh detected!" ${QUIET} + break + else + warn_msg "${NEW_ROOT}/bin/sh was not found or is not executable, maybe we are working with NFS?" ${QUIET} + fi + + if [ "${REAL_ROOT}" = "/dev/nfs" ] + then + good_msg "NFS detected!" ${QUIET} + break + else + warn_msg "No NFS detected!" ${QUIET} + fi + + bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /!" + got_good_root=0 else - bad_msg "Could not mount specified ROOT, try again" + bad_msg "Could not mount specified ROOT!" got_good_root=0 fi fi