Blame SOURCES/0010-Name-lvm-boot-partitions-by-fstab-entry-893472.patch

2e96e6
From 163af6741ad259dc1a92ffcca2f563d0ea86bb44 Mon Sep 17 00:00:00 2001
2e96e6
From: Gene Czarcinski <gczarcinski@gmail.com>
2e96e6
Date: Tue, 5 Feb 2013 21:47:40 +0330
2e96e6
Subject: [PATCH 10/18] Name lvm boot partitions by fstab entry(#893472)
2e96e6
2e96e6
Recognize boot partitions on separate logical volumes and name them
2e96e6
using their fstab entries.
2e96e6
2e96e6
Resolves: rhbz#893472
2e96e6
---
2e96e6
 common.sh | 11 ++++++++++-
2e96e6
 1 file changed, 10 insertions(+), 1 deletion(-)
2e96e6
2e96e6
diff --git a/common.sh b/common.sh
2e96e6
index 85d13f0..52b0d2b 100644
2e96e6
--- a/common.sh
2e96e6
+++ b/common.sh
2e96e6
@@ -246,7 +246,7 @@ linux_mount_boot () {
2e96e6
 				if [ "$bindfrom" != "$tmpmnt/boot" ]; then
2e96e6
 					if mount --bind "$bindfrom" "$tmpmnt/boot"; then
2e96e6
 						mounted=1
2e96e6
-						bootpart="$1"
2e96e6
+						bootpart="$tmppart"
2e96e6
 					else
2e96e6
 						debug "failed to bind-mount $bindfrom onto $tmpmnt/boot"
2e96e6
 					fi
2e96e6
@@ -254,6 +254,15 @@ linux_mount_boot () {
2e96e6
 			fi
2e96e6
 			if [ "$mounted" ]; then
2e96e6
 				:
2e96e6
+			elif [ -e "$tmppart" ]; then
2e96e6
+				bootpart="$tmppart"
2e96e6
+				boottomnt="$tmppart"
2e96e6
+			elif [ -e "$tmpmnt/$tmppart" ]; then
2e96e6
+				bootpart="$tmppart"
2e96e6
+				boottomnt="$tmpmnt/$tmppart"
2e96e6
+			elif [ -e "/target/$tmppart" ]; then
2e96e6
+				bootpart="$tmppart"
2e96e6
+				boottomnt="/target/$tmppart"
2e96e6
 			elif [ -e "$1" ]; then
2e96e6
 				bootpart="$1"
2e96e6
 				boottomnt="$1"
2e96e6
-- 
2e96e6
2.5.5
2e96e6