File grub-0.97-bz870420-Do-not-resolve-symlinks-in-dev-mapper-dir.patch of Package grub

From 7a395ff44bc05ebad8d23094d28c93c2aa059384 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=A1clav=20Pavl=C3=ADn?= <vpavlin@redhat.com>
Date: Wed, 21 Nov 2012 14:21:48 +0100
Subject: [PATCH] Resolve symlink only if the file is not in /dev/mapper/

---
 util/grub-install.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/util/grub-install.in b/util/grub-install.in
index 1039340..ce00022 100644
--- a/util/grub-install.in
+++ b/util/grub-install.in
@@ -524,7 +524,10 @@ fi
 # Check for INSTALL_DEVICE.
 case "$install_device" in
 /dev/*)
-    install_device=`resolve_symlink "$install_device"` || exit 1
+    echo $install_device | grep -q "^/dev/mapper"
+    if [ "x$?" != "x0" ]; then
+        install_device=`resolve_symlink "$install_device"` || exit 1
+    fi
     for install_drive in `find_real_devs $install_device` ; do
 	install_drive=`convert $install_drive` || exit 1
 	if is_raid1_device $install_device; then
-- 
1.7.11.7

openSUSE Build Service is sponsored by