ceph: make config parser less greedy

Options such as:
  osd mount options xfs = -i size=2048 -n size=16k
were parsed as:
  key: 'osd mount options xfs = -i size=2048 -n size'
  value: '16k'

This is due to the greedy .* in the beginning. Making it
non-greedy fixes this.

Fixes #851
This commit is contained in:
Wolfgang Bumiller 2015-12-15 08:12:46 +01:00 committed by Dietmar Maurer
parent f65c77d3ca
commit 15a5cdd1b3

View File

@ -139,7 +139,7 @@ sub parse_ceph_config {
next;
}
if ($line =~ m/^(.*\S)\s*=\s*(\S.*)$/) {
if ($line =~ m/^(.*?\S)\s*=\s*(\S.*)$/) {
$cfg->{$section}->{$1} = $2;
}