]> git.proxmox.com Git - pve-storage.git/commitdiff
CephConfig: do not always interpret '; ' as a comment
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 27 Jun 2019 08:43:10 +0000 (10:43 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 27 Jun 2019 14:16:36 +0000 (16:16 +0200)
; 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>
PVE/CephConfig.pm

index ab78328c2b9068a49ee960cf8c99052bbf12b32d..3ff49eeecdc77adc7ef5716e59b1c69dbc05ca10 100644 (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;