aboutsummaryrefslogtreecommitdiff
blob: 61c859429fa28be96902dfcfdda1e42f14ad72b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 628e1a30b384a900cf7095cf86441fed7a0300dc Mon Sep 17 00:00:00 2001
From: Georgy Yakovlev <gyakovlev@gentoo.org>
Date: Fri, 14 May 2021 22:05:33 -0700
Subject: [PATCH] defaults/initrd.scripts: don't skip top level devices with
 partitions

ppc64 media should be mounted as /dev/sdX, not as /dev/sdX1
this loop was skipping /dev/sdX if /dev/sdX1 is present.

Bug: https://bugs.gentoo.org/796272
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
---
 defaults/initrd.scripts | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 5ec8adb..bfc36cf 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -178,24 +178,6 @@ findmediamount() {
 			# Check for a block device to mount
 			if [ -b "${x}" ]
 			then
-				skip=0
-				bsn=$(basename "${x}")
-				#
-				# If disk and it has at least one partition, skip.
-				# We use /sys/block/${bsn}/${bsn}[0-9]* to make sure that we
-				# don't skip device mapper devices. Even the craziest scenario
-				# deserves a fair chance.
-				#
-				# shellcheck disable=SC2045
-				for part in $(ls /sys/block/${bsn}/${bsn}*[0-9]* 2>/dev/null)
-				do
-					skip=1
-					break;
-				done
-				if [ ${skip} -eq 1 ]
-				then
-					continue
-				fi
 				good_msg "Attempting to mount media: ${x}" ${CRYPT_SILENT}
 
 				CDROOT_TYPE=$(determine_fs "${x}" "${CDROOT_TYPE}")
-- 
2.31.1