]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh:fix check_vol_slaves() volume group name stripping
authorHarald Hoyer <harald@redhat.com>
Mon, 18 Jan 2016 15:59:42 +0000 (16:59 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 29 Feb 2016 10:41:42 +0000 (11:41 +0100)
commit 466a59984a095f33993cffd5a3bea40826469b03 removed whitespace
stripping from lvm volume group names.

(cherry picked from commit 2fd8588da51a0e43684852dcdabe327aca684a9f)

dracut-functions.sh

index 9218779ca86fbd5924dfb4a0fe35720c759439c8..d71ff67683d112e33ac78da04d0492760023efed 100755 (executable)
@@ -687,7 +687,7 @@ check_vol_slaves() {
         if [[ $_lv = $2 ]]; then
             _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null)
             # strip space
-            _vg=$(printf "%s\n" "$_vg")
+            _vg="${_vg//[[:space:]]/}"
             if [[ $_vg ]]; then
                 for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null)
                 do