summaryrefslogtreecommitdiff
path: root/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
commite23a08d0c97a0cc415aaa165da840b056f93c997 (patch)
tree4c5f7db60483518201fef36f8cc0712789a08db2 /sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch
parent391b5b359a346aff490103da7dddc85047f83830 (diff)
gentoo resync : 08.10.2021
Diffstat (limited to 'sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch')
-rw-r--r--sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch b/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch
new file mode 100644
index 000000000000..e38d85a77feb
--- /dev/null
+++ b/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch
@@ -0,0 +1,34 @@
+For symlinks to partions in fstab, returns the partition name from fstab instead
+of the name of its resolved destination, eg., for /dev/mapper/mylvmvol in fstab,
+linked to /dev/dm-2, return "mylvmvol" instead of "dm-2".
+
+Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699839
+ https://bugzilla.redhat.com/show_bug.cgi?id=893472
+
+--- a/common.sh
++++ b/common.sh
+@@ -269,7 +269,7 @@ linux_mount_boot () {
+ if [ "$bindfrom" != "$tmpmnt/boot" ]; then
+ if mount --bind "$bindfrom" "$tmpmnt/boot"; then
+ mounted=1
+- bootpart="$1"
++ bootpart="$tmppart"
+ else
+ debug "failed to bind-mount $bindfrom onto $tmpmnt/boot"
+ fi
+@@ -277,6 +277,15 @@ linux_mount_boot () {
+ fi
+ if [ "$mounted" ]; then
+ :
++ elif [ -e "$tmppart" ]; then
++ bootpart="$tmppart"
++ boottomnt="$tmppart"
++ elif [ -e "$tmpmnt/$tmppart" ]; then
++ bootpart="$tmppart"
++ boottomnt="$tmpmnt/$tmppart"
++ elif [ -e "/target/$tmppart" ]; then
++ bootpart="$tmppart"
++ boottomnt="/target/$tmppart"
+ elif [ -e "$1" ]; then
+ bootpart="$1"
+ boottomnt="$1"