]> git.pld-linux.org Git - packages/grub2.git/commitdiff
grub-mkconfig: use lvs to expand LVM path. more reliable auto/th/grub2-2.02-0.beta2.2
authorElan Ruusamäe <glen@delfi.ee>
Mon, 13 Jan 2014 14:14:20 +0000 (16:14 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 13 Jan 2014 14:14:20 +0000 (16:14 +0200)
grub-lvmdevice.patch
grub2.spec

index 7b9c2510ace3e9d6a913275a639fcfb3241b1d4b..0f9d87fa8f915f7efbdc1793d1ac4048cb7b0065 100644 (file)
@@ -1,7 +1,6 @@
-diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub-mkconfig.in grub-2.02~beta2/util/grub-mkconfig.in
---- grub-2.02~beta2.orig/util/grub-mkconfig.in 2014-01-04 10:59:07.595221161 +0100
-+++ grub-2.02~beta2/util/grub-mkconfig.in      2014-01-04 11:00:01.898554984 +0100
-@@ -130,6 +130,27 @@
+--- grub-2.02~beta2/util/grub-mkconfig.in~     2014-01-13 16:12:41.020705075 +0200
++++ grub-2.02~beta2/util/grub-mkconfig.in      2014-01-13 16:10:42.000000000 +0200
+@@ -131,6 +131,21 @@
  
  # Device containing our userland.  Typically used for root= parameter.
  GRUB_DEVICE="`${grub_probe} --target=device /`"
@@ -12,17 +11,11 @@ diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub-mkconfig.in grub-2.
 +# /dev/mapper/vg--meaw-root -> /dev/vg-meaw/root
 +case "$GRUB_DEVICE" in
 +      /dev/mapper/*-*)
-+              DM_REAL_DEVICE="$(readlink -f "$GRUB_DEVICE")"
-+              DM_UUID="$(cat /sys/block/${DM_REAL_DEVICE#/dev/}/dm/uuid)"
-+              case "$DM_UUID" in
-+                      LVM-*)
-+                              # change "--" to / (as "/" is impossible in LV name)
-+                              local dev=$(awk -vdev="${GRUB_DEVICE#/dev/mapper/}" 'BEGIN{gsub(/--/, "/", dev); print dev}')
-+                              local VG=$(awk -vdev="$dev" 'BEGIN{split(dev, v, "-"); gsub("/", "-", v[1]); print v[1]}')
-+                              local LV=$(awk -vdev="$dev" 'BEGIN{split(dev, v, "-"); gsub("/", "-", v[2]); print v[2]}')
-+                              GRUB_DEVICE=/dev/$VG/$LV
-+                              ;;
-+              esac
++              LVM2_LV_NAME='' LVM2_VG_NAME=''
++              eval $(lvs --noheadings --nameprefixes "$GRUB_DEVICE" 2>/dev/null)
++              if [ -n "$LVM2_VG_NAME$LVM2_LV_NAME" ]; then
++                      GRUB_DEVICE=/dev/$LVM2_VG_NAME/$LVM2_LV_NAME
++              fi
 +      ;;
 +esac
 +
index 81fa5a95d54ae230f658467d5c94dc325e6f000a..a3c267f988dad9c7561c5150a434ae40e9f0c5d5 100644 (file)
@@ -44,10 +44,10 @@ Summary(de.UTF-8):  GRUB2 - ein Bootloader für x86 und ppc
 Summary(hu.UTF-8):     GRUB2 - rendszerbetöltő x86 és ppc gépekhez
 Summary(pl.UTF-8):     GRUB2 - bootloader dla x86 i ppc
 Summary(pt_BR.UTF-8):  Gerenciador de inicialização GRUB2
+%define        beta    beta2
 Name:          grub2
 Version:       2.02
-%define        beta    beta2
-Release:       0.%{beta}.1
+Release:       0.%{beta}.2
 License:       GPL v2
 Group:         Base
 # git://git.savannah.gnu.org/grub.git
@@ -60,7 +60,7 @@ Source3:      grub.sysconfig
 Source4:       grub-custom.cfg
 # ./linguas.sh
 # TS=$(date +'%Y%m%d') ; tar cjvf grub-po-2.00.git$TS.tar.bz2 po/*.po po/LINGUAS
-Source5:       grub-po-2.02.git20140104.tar.bz2
+Source5:       grub-po-%{version}.git20140104.tar.bz2
 # Source5-md5: aeef3e636178093cf9d780d92da7afdb
 Patch1:                pld-sysconfdir.patch
 Patch2:                grub-garbage.patch
This page took 0.401042 seconds and 4 git commands to generate.