From: Gunnar Beutner Date: Fri, 13 Sep 2013 07:45:24 +0000 (+0200) Subject: Fix custom macros. X-Git-Tag: v0.0.3~521 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb43cc31014798158948cbde843d375cd390c387;p=icinga2 Fix custom macros. --- diff --git a/tools/configconvert/Icinga2/ExportIcinga2Cfg.pm b/tools/configconvert/Icinga2/ExportIcinga2Cfg.pm index bddabf161..6a94c4bb6 100644 --- a/tools/configconvert/Icinga2/ExportIcinga2Cfg.pm +++ b/tools/configconvert/Icinga2/ExportIcinga2Cfg.pm @@ -478,7 +478,7 @@ sub dump_service_2x { dump_config_line($icinga2_cfg, "\tmacros += {"); foreach my $custom_key (keys %{$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) { - if ($custom_key =~ /^_/) { + if ($custom_key !~ /^_/) { next; } @@ -623,7 +623,7 @@ sub dump_host_2x { dump_config_line($icinga2_cfg, "\tmacros += {"); foreach my $custom_key (keys %{$host_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) { - if ($custom_key =~ /^_/) { + if ($custom_key !~ /^_/) { next; } @@ -847,7 +847,7 @@ sub dump_host_2x { dump_config_line($icinga2_cfg, "\t\tmacros += {"); foreach my $custom_key (keys %{$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) { - if ($custom_key =~ /^_/) { + if ($custom_key !~ /^_/) { next; } @@ -952,7 +952,7 @@ sub dump_user_2x { dump_config_line($icinga2_cfg, "\tmacros += {"); foreach my $custom_key (keys %{$user_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) { - if ($custom_key =~ /^_/) { + if ($custom_key !~ /^_/) { next; }