Blame SOURCES/0019-Do-not-resolve-device-mapper-symlinks-1300262.patch

2e96e6
From 9334a9b2d6de855a1a027a106d3976d342044257 Mon Sep 17 00:00:00 2001
2e96e6
From: Robert Marshall <rmarshall@redhat.com>
2e96e6
Date: Wed, 11 May 2016 18:04:20 -0400
2e96e6
Subject: [PATCH] Do not resolve device mapper symlinks (#1300262)
2e96e6
2e96e6
Fixes an issue where os-prober used the non-guaranteed /dev/dm-# device
2e96e6
name rather than the guaranteed device mapper node name.
2e96e6
2e96e6
Resolves: rhbz#1300262
2e96e6
---
2e96e6
 linux-boot-probes/mounted/common/90fallback | 7 ++++++-
2e96e6
 1 file changed, 6 insertions(+), 1 deletion(-)
2e96e6
2e96e6
diff --git a/linux-boot-probes/mounted/common/90fallback b/linux-boot-probes/mounted/common/90fallback
2e96e6
index 9ff78e1..da12b88 100755
2e96e6
--- a/linux-boot-probes/mounted/common/90fallback
2e96e6
+++ b/linux-boot-probes/mounted/common/90fallback
2e96e6
@@ -9,7 +9,12 @@ bootpart="$2"
2e96e6
 mpoint="$3"
2e96e6
 type="$4"
2e96e6
 
2e96e6
-mappedpartition=$(mapdevfs "$partition" 2>/dev/null) || mappedpartition="$partition"
2e96e6
+# Falling back to /dev/dm-# is unreliable; do not revert them
2e96e6
+if [ "${partition:0:12}" == "/dev/mapper/" ]; then
2e96e6
+        mappedpartition="${partition}"
2e96e6
+else
2e96e6
+        mappedpartition=$(mapdevfs "$partition" 2>/dev/null) || mappedpartition="$partition"
2e96e6
+fi
2e96e6
 
2e96e6
 exitcode=1
2e96e6
 for kernpat in /vmlinuz /vmlinux /boot/vmlinuz /boot/vmlinux "/boot/vmlinuz*" \
2e96e6
-- 
2e96e6
2.5.5
2e96e6