]> 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, 18 Jan 2016 16:01:15 +0000 (17:01 +0100)
commit 466a59984a095f33993cffd5a3bea40826469b03 removed whitespace
stripping from lvm volume group names.

dracut-functions.sh

index 59747ec1d6b4de0187a7da29dfa377c6f81fc2fc..c7ea9f580a9b53fbad8a1dac6935f52a42feef70 100755 (executable)
@@ -580,7 +580,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