commit | 15d40a56832baadc65fe5261f5f53ce24ad00e84 | [log] [tgz] |
---|---|---|
author | Andreas Scheuring <andreas.scheuring@de.ibm.com> | Thu Feb 26 09:08:09 2015 +0100 |
committer | Ian Wienand <iwienand@redhat.com> | Thu Feb 26 10:18:41 2015 +0000 |
tree | 6825e707f45bd9c35511d9dc738a99cc4eb779b0 | |
parent | da533fa7908259ff8d78580a4751a6329e428fa1 [diff] |
Add quotation marks to parse string correclty on rhel7 Problem: On rhel7 the lvm.conf filter is generated wrongly Root Cause: bash-4.2 (rhel7/centos7) incorrectly splits herestrings when combined with IFS. See [1] and [2] Quoting the argument is a safe work-around [1] http://stackoverflow.com/questions/20144593/trying-to-split-a-string-into-two-variables [2] https://bugzilla.redhat.com/show_bug.cgi?id=1196566 Closes-Bug #1425839 Change-Id: Ie82fcd7ef0deacbb6aaf18c5c466a5d5baf52681
diff --git a/lib/cinder_backends/lvm b/lib/cinder_backends/lvm index d83c31a..52fc6fb 100644 --- a/lib/cinder_backends/lvm +++ b/lib/cinder_backends/lvm
@@ -78,9 +78,9 @@ for pv_info in $(sudo pvs --noheadings -o name,vg_name --separator ';'); do echo_summary "Evaluate PV info for Cinder lvm.conf: $pv_info" - IFS=';' read pv vg <<< $pv_info + IFS=';' read pv vg <<< "$pv_info" for line in ${conf_entries}; do - IFS='=' read label group <<< $line + IFS='=' read label group <<< "$line" group=$(echo $group|sed "s/^ *//g") if [[ "$vg" == "$group" ]]; then new="\"a$pv/\", "