From c835d9eca8b92bf88438435ad903d9c75d6c749c Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 27 Jun 2019 10:43:10 +0200 Subject: [PATCH] CephConfig: do not always interpret '; ' as a comment ; is the beginning of a comment, but in some configuration settings it is also valid syntax, e.g. for mon_host it is a valid seperator for hosts (sigh ...) only remove lines when it starts with a ';' since we remove all comments anyway any time we write the ceph conf it should not really matter for our users Signed-off-by: Dominik Csapak --- PVE/CephConfig.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/CephConfig.pm b/PVE/CephConfig.pm index ab78328..3ff49ee 100644 --- a/PVE/CephConfig.pm +++ b/PVE/CephConfig.pm @@ -21,8 +21,9 @@ sub parse_ceph_config { my $section; foreach my $line (@lines) { - $line =~ s/[;#].*$//; + $line =~ s/#.*$//; $line =~ s/^\s+//; + $line =~ s/^;.*$//; $line =~ s/\s+$//; next if !$line; -- 2.39.2