- fixed lvm version parsing
This commit is contained in:
parent
59f9af3305
commit
3ed919645c
76
0015-90lvm-lvm_scan.sh-fixed-lvm-version-parsing.patch
Normal file
76
0015-90lvm-lvm_scan.sh-fixed-lvm-version-parsing.patch
Normal file
@ -0,0 +1,76 @@
|
||||
From 53570e16c3c83c3975ff789303ce175027673795 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Tue, 22 Feb 2011 17:45:11 +0100
|
||||
Subject: [PATCH] 90lvm/lvm_scan.sh: fixed lvm version parsing
|
||||
|
||||
---
|
||||
modules.d/90lvm/lvm_scan.sh | 48 ++++++++++++++++++++----------------------
|
||||
1 files changed, 23 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
|
||||
index 7d56fce..9f9ce92 100755
|
||||
--- a/modules.d/90lvm/lvm_scan.sh
|
||||
+++ b/modules.d/90lvm/lvm_scan.sh
|
||||
@@ -45,37 +45,35 @@ if [ ! -e /etc/lvm/lvm.conf ]; then
|
||||
fi
|
||||
|
||||
check_lvm_ver() {
|
||||
- maj=$1; shift;
|
||||
- min=$1; shift;
|
||||
- ver=$1; shift;
|
||||
+ maj=$1
|
||||
+ min=$2
|
||||
+ ver=$3
|
||||
# --poll is supported since 2.2.57
|
||||
- [ $1 -lt $maj ] && return 1
|
||||
- [ $1 -gt $maj ] && return 0
|
||||
- [ $2 -lt $min ] && return 1
|
||||
- [ $2 -gt $min ] && return 0
|
||||
- [ $3 -ge $ver ] && return 0
|
||||
+ [ $4 -lt $maj ] && return 1
|
||||
+ [ $4 -gt $maj ] && return 0
|
||||
+ [ $5 -lt $min ] && return 1
|
||||
+ [ $5 -gt $min ] && return 0
|
||||
+ [ $6 -ge $ver ] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
-lvm version 2>/dev/null | ( \
|
||||
- IFS=. read maj min sub;
|
||||
- maj=${maj##*:};
|
||||
- sub=${sub%% *}; sub=${sub%%\(*};
|
||||
- ) 2>/dev/null
|
||||
-
|
||||
-nopoll=$(
|
||||
- # hopefully this output format will never change, e.g.:
|
||||
- # LVM version: 2.02.53(1) (2009-09-25)
|
||||
- check_lvm_ver 2 2 57 $maj $min $sub && \
|
||||
- echo " --poll n ";
|
||||
-)
|
||||
-
|
||||
-sysinit=$(
|
||||
- # hopefully this output format will never change, e.g.:
|
||||
- # LVM version: 2.02.53(1) (2009-09-25)
|
||||
- check_lvm_ver 2 2 65 $maj $min $sub && \
|
||||
- echo " --sysinit ";
|
||||
-)
|
||||
+# hopefully this output format will never change, e.g.:
|
||||
+# LVM version: 2.02.53(1) (2009-09-25)
|
||||
+OLDIFS=$IFS
|
||||
+IFS=.
|
||||
+set $(lvm version 2>/dev/null)
|
||||
+IFS=$OLDIFS
|
||||
+maj min sub
|
||||
+maj=${1##*:}
|
||||
+min=$2
|
||||
+sub=${3%% *}
|
||||
+sub=${sub%%\(*};
|
||||
+
|
||||
+check_lvm_ver 2 2 57 $maj $min $sub && \
|
||||
+ nopoll="--poll n"
|
||||
+
|
||||
+check_lvm_ver 2 2 65 $maj $min $sub && \
|
||||
+ sysinit=" --sysinit "
|
||||
|
||||
export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
Name: dracut
|
||||
Version: 008
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
|
||||
Summary: Initramfs generator using udev
|
||||
%if 0%{?fedora}
|
||||
@ -96,6 +96,7 @@ Patch11: 0011-Makefile-do-not-dash-syntax-check-module-setup.sh.patch
|
||||
Patch12: 0012-init-set-cdrom-polling-in-kernel.patch
|
||||
Patch13: 0013-fix-c0a82e271e2730159f042ee7d7fc4aca2e08d28a.patch
|
||||
Patch14: 0014-vconsole.font.unicode-vconsole.unicode.patch
|
||||
Patch15: 0015-90lvm-lvm_scan.sh-fixed-lvm-version-parsing.patch
|
||||
|
||||
%description
|
||||
Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels.
|
||||
@ -173,6 +174,7 @@ This package contains tools to assemble the local initrd and host configuration.
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
|
||||
%build
|
||||
make WITH_SWITCH_ROOT=0%{?with_switch_root}
|
||||
@ -297,6 +299,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%dir /var/lib/dracut/overlay
|
||||
|
||||
%changelog
|
||||
* Tue Feb 22 2011 Harald Hoyer <harald@redhat.com> 008-6
|
||||
- fixed lvm version parsing
|
||||
|
||||
* Mon Feb 21 2011 Harald Hoyer <harald@redhat.com> 008-5
|
||||
- fixed i18n unicode setting
|
||||
- set cdrom in kernel polling
|
||||
|
Loading…
Reference in New Issue
Block a user