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 6D30C138334 for ; Mon, 25 Nov 2019 13:53:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BD8EBE0817; Mon, 25 Nov 2019 13:53:09 +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 9E9C2E0817 for ; Mon, 25 Nov 2019 13:53:09 +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 BEEA934D387 for ; Mon, 25 Nov 2019 13:53:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 217558C1 for ; Mon, 25 Nov 2019 13:53:07 +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: <1574689242.5dbad2e10c32043f90e6507438d93c9a9d480e07.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/initrd.scripts X-VCS-Directories: defaults/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 5dbad2e10c32043f90e6507438d93c9a9d480e07 X-VCS-Branch: master Date: Mon, 25 Nov 2019 13:53:07 +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: 2fe5f13c-650a-4e27-866b-48db14c7e1fa X-Archives-Hash: 757b12645dbdec2f2740320df3b702e2 commit: 5dbad2e10c32043f90e6507438d93c9a9d480e07 Author: Thomas Deutschmann gentoo org> AuthorDate: Mon Nov 25 13:40:42 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Mon Nov 25 13:40:42 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=5dbad2e1 initrd.scripts: modules_scan(): Disable smart module loading when root needs an external program When using dolvm or domdadm for example, root won't be available until lvm program scanned for volumes and made them available or mdadm program was called to assemble RAID. So checking for root block device after each module was loaded won't save us any time instead will just waste time. Signed-off-by: Thomas Deutschmann gentoo.org> defaults/initrd.scripts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 561788d..c19701c 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -53,17 +53,17 @@ modules_scan() { # We don't know if kernel supports root filesystem so # better load all filesystems ... smart_loading= - elif [ -n "${CRYPT_ROOT}" ] || [ -n "${CRYPT_SWAP}" ] - then - if [ "${1}" = "crypto" ] - then - smart_loading= - elif [ "${1}" = "usb" ] - then - # We don't know if user is using an USB keyboard to - # enter passphrase so better load USB ... - smart_loading= - fi + elif [ "${USE_MDADM}" = '1' ] \ + || [ "${USE_LVM_NORMAL}" = '1' ] \ + || [ "${USE_CRYPTSETUP}" = '1' ] \ + || [ "${USE_BTRFS}" = '1' ] \ + || [ "${USE_ZFS}" = '1' ] \ + || [ "${USE_DMRAID_NORMAL}" = '1' ] + then + # All of this will require the call of another program before + # root becomes available so checking for root after each module + # was loaded will only waste time. + smart_loading= fi MODS=$(cat /etc/modules/${1} 2>/dev/null)