]> granicus.if.org Git - icinga2/commitdiff
Config Conversion: Fix import removing inline comments after ';' and '#'.
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 12 Sep 2013 16:40:16 +0000 (18:40 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 12 Sep 2013 16:41:18 +0000 (18:41 +0200)
fixes #4499

tools/configconvert/Icinga2/ImportIcinga1Cfg.pm

index 8667adfad06fb67ba3ccffb34e2f21da89a3494a..677d65d494ab5172be73e62c410939bde14f35a3 100644 (file)
@@ -168,7 +168,7 @@ sub parse_icinga1_object_cfg {
         elsif ($in_define == 1) {
 
             # first, remove the annoying inline comments after ';'
-            $line =~ s/\s*;(.*)$//;
+            $line =~ s/\s*[;\#](.*)$//;
             $inline_comment = $1;
 
             # then split it and save it by type->cnt->attr->val