Blame SOURCES/0363-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch

18971c
From 28665b4fa55f18760ade77602d69f892d86b0bbd Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Mon, 18 Jan 2016 16:59:42 +0100
18971c
Subject: [PATCH] dracut-functions.sh:fix check_vol_slaves() volume group name
18971c
 stripping
18971c
18971c
commit 466a59984a095f33993cffd5a3bea40826469b03 removed whitespace
18971c
stripping from lvm volume group names.
18971c
18971c
(cherry picked from commit 2fd8588da51a0e43684852dcdabe327aca684a9f)
18971c
---
18971c
 dracut-functions.sh | 2 +-
18971c
 1 file changed, 1 insertion(+), 1 deletion(-)
18971c
18971c
diff --git a/dracut-functions.sh b/dracut-functions.sh
18971c
index 9218779c..d71ff676 100755
18971c
--- a/dracut-functions.sh
18971c
+++ b/dracut-functions.sh
18971c
@@ -687,7 +687,7 @@ check_vol_slaves() {
18971c
         if [[ $_lv = $2 ]]; then
18971c
             _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null)
18971c
             # strip space
18971c
-            _vg=$(printf "%s\n" "$_vg")
18971c
+            _vg="${_vg//[[:space:]]/}"
18971c
             if [[ $_vg ]]; then
18971c
                 for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null)
18971c
                 do