From 15a5cdd1b33e7b4e5fbbbfd628f867ff8e5db677 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 15 Dec 2015 08:12:46 +0100 Subject: [PATCH] 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 --- PVE/CephTools.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/CephTools.pm b/PVE/CephTools.pm index 1c639e33..ec91f442 100644 --- a/PVE/CephTools.pm +++ b/PVE/CephTools.pm @@ -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; }