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 <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2019-06-27 10:43:10 +02:00
committed by Thomas Lamprecht
parent b0125b6ae5
commit c835d9eca8

View File

@ -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;