[icinga-checkins] icinga.org: icinga2/feature/configconvert-2743: configconversion: explicitely check __I2CONVERT_USES_TEMPLATE == 1 when dumping service templates

git at icinga.org git at icinga.org
Tue Apr 30 19:49:47 CEST 2013


Module: icinga2
Branch: feature/configconvert-2743
Commit: 3fb8b4474060d1631155a8aceff569744ff23567
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=3fb8b4474060d1631155a8aceff569744ff23567

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Tue Apr 30 19:28:26 2013 +0200

configconversion: explicitely check __I2CONVERT_USES_TEMPLATE == 1 when dumping service templates

refs #4020

---

 contrib/configconvert/Icinga2/ExportIcinga2Cfg.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/configconvert/Icinga2/ExportIcinga2Cfg.pm b/contrib/configconvert/Icinga2/ExportIcinga2Cfg.pm
index eaee62d..f59f3cb 100644
--- a/contrib/configconvert/Icinga2/ExportIcinga2Cfg.pm
+++ b/contrib/configconvert/Icinga2/ExportIcinga2Cfg.pm
@@ -273,7 +273,7 @@ sub dump_host_2x {
         ####################################################
         # templates
         ####################################################
-        if(defined($service_2x->{'__I2CONVERT_USES_TEMPLATE'})) {
+        if (defined($service_2x->{'__I2CONVERT_USES_TEMPLATE'}) && $service_2x->{'__I2CONVERT_USES_TEMPLATE'} == 1) {
             my $service_2x_templates = join '", "', @{$service_2x->{'__I2CONVERT_TEMPLATE_NAMES'}};
             dump_config_line($icinga2_cfg, "\t\ttemplates = [ \"$service_2x_templates\" ],")
         }





More information about the icinga-checkins mailing list