From: Dominik Csapak Date: Thu, 27 Jun 2019 08:43:10 +0000 (+0200) Subject: CephConfig: do not always interpret '; ' as a comment X-Git-Url: https://git.proxmox.com/?p=pve-storage.git;a=commitdiff_plain;h=c835d9eca8b92bf88438435ad903d9c75d6c749c 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 --- 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;