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 64F6B138335 for ; Mon, 15 Jul 2019 22:39:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 10351E082F; Mon, 15 Jul 2019 22:39:36 +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 EA558E082F for ; Mon, 15 Jul 2019 22:39:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 9DC59347C56 for ; Mon, 15 Jul 2019 22:39:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8F2FF6FF for ; Mon, 15 Jul 2019 22:39:32 +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: <1563229197.9539ed41bb78bd6c3630b7747593090afbf14e6c.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/initrd.scripts defaults/linuxrc X-VCS-Directories: defaults/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 9539ed41bb78bd6c3630b7747593090afbf14e6c X-VCS-Branch: master Date: Mon, 15 Jul 2019 22:39:32 +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: b80ba416-da12-47d1-9fa8-f47d3d302f4a X-Archives-Hash: 356e3a4523d1c2087bbf942ac17d8da3 commit: 9539ed41bb78bd6c3630b7747593090afbf14e6c Author: Thomas Deutschmann gentoo org> AuthorDate: Mon Jul 15 22:19:57 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Mon Jul 15 22:19:57 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=9539ed41 linuxrc: Add rootdelay timeout indicator Signed-off-by: Thomas Deutschmann gentoo.org> defaults/initrd.scripts | 8 ++++++++ defaults/linuxrc | 12 +++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index c4a037b..a47b1ed 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -882,6 +882,14 @@ good_msg() { [ "$2" != '1' ] && printf "%b\n" "${GOOD}>>${NORMAL}${BOLD} ${msg_string} ${NORMAL}" } +good_msg_n() { + [ -n "${QUIET}" ] && [ -z "${DEBUG}" ] && return 0 + + msg_string=${1} + msg_string="${msg_string:-...}" + [ "$2" != '1' ] && printf "%b" "${GOOD}>>${NORMAL}${BOLD} ${msg_string}" +} + bad_msg() { msg_string=${1} msg_string="${msg_string:-...}" diff --git a/defaults/linuxrc b/defaults/linuxrc index d84cc65..f1cbec1 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -593,11 +593,12 @@ then fi # Determine root device -good_msg 'Determining root device ...' ROOTDELAY_100MSEC=1 [ -n "${ROOTDELAY}" ] && ROOTDELAY_100MSEC=$((${ROOTDELAY} * 10)) while true do + good_msg_n 'Determining root device ...' + while [ "${got_good_root}" != '1' ] do # Start of sleep loop waiting on root @@ -624,6 +625,7 @@ do then got_good_root=1 REAL_ROOT="${ROOT_DEV}" + echo good_msg "Detected real_root=${ROOT_DEV}" break fi @@ -643,6 +645,7 @@ do got_good_root=1 REAL_ROOT=${ROOT_DEV} ROOTFSTYPE=zfs + echo good_msg "Detected real_root=${ROOT_DEV}" break else @@ -661,6 +664,7 @@ do got_good_root=1 REAL_ROOT=${i} ROOTFSTYPE=zfs + echo good_msg "Detected real_root=${ROOT_DEV}" break fi @@ -682,6 +686,12 @@ do then let ROOTDELAY_100MSEC=${ROOTDELAY_100MSEC}-1 sleep 0.1s + + let ROOTDELAY_100MSEC_MODULO=${ROOTDELAY_100MSEC}%10 + if [ ${ROOTDELAY_100MSEC_MODULO} = 0 ] + then + printf "." + fi fi done # End of sleep loop waiting on root