Blame SOURCES/0020-Use-POSIX-shell-syntax-1300262.patch

2e96e6
From f3efe9a4f506534e51d8251c74e6df74dfaefc30 Mon Sep 17 00:00:00 2001
2e96e6
From: Robert Marshall <rmarshall@redhat.com>
2e96e6
Date: Wed, 6 Jul 2016 13:24:48 -0400
2e96e6
Subject: [PATCH] Use POSIX shell syntax (#1300262)
2e96e6
2e96e6
Resolves POSIX compliance issues raised by coverity in relation to the patch
2e96e6
causing device mapper devices to return their guaranteed name versus
2e96e6
resolving the symlinks to the dm-# format.
2e96e6
2e96e6
Related: rhbz#1300262
2e96e6
---
2e96e6
 linux-boot-probes/mounted/common/90fallback | 2 +-
2e96e6
 1 file changed, 1 insertion(+), 1 deletion(-)
2e96e6
2e96e6
diff --git a/linux-boot-probes/mounted/common/90fallback b/linux-boot-probes/mounted/common/90fallback
2e96e6
index da12b88..3c5fdb0 100755
2e96e6
--- a/linux-boot-probes/mounted/common/90fallback
2e96e6
+++ b/linux-boot-probes/mounted/common/90fallback
2e96e6
@@ -10,7 +10,7 @@ mpoint="$3"
2e96e6
 type="$4"
2e96e6
 
2e96e6
 # Falling back to /dev/dm-# is unreliable; do not revert them
2e96e6
-if [ "${partition:0:12}" == "/dev/mapper/" ]; then
2e96e6
+if [ "$(echo "${partition}" | cut -c1-12)" = "/dev/mapper/" ]; then
2e96e6
         mappedpartition="${partition}"
2e96e6
 else
2e96e6
         mappedpartition=$(mapdevfs "$partition" 2>/dev/null) || mappedpartition="$partition"
2e96e6
-- 
2e96e6
2.5.5
2e96e6