[icinga-checkins] icinga.org: icinga2/feature/configconvert-2743: configconvert: treat 'null' (disable inheritance) as '0' instead

git at icinga.org git at icinga.org
Wed Jun 26 14:31:10 CEST 2013


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

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Wed Jun 26 14:29:31 2013 +0200

configconvert: treat 'null' (disable inheritance) as '0' instead

refs #2743

---

 tools/configconvert/Icinga2/ImportIcinga1Cfg.pm |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/configconvert/Icinga2/ImportIcinga1Cfg.pm b/tools/configconvert/Icinga2/ImportIcinga1Cfg.pm
index cab1003..d94a8a0 100644
--- a/tools/configconvert/Icinga2/ImportIcinga1Cfg.pm
+++ b/tools/configconvert/Icinga2/ImportIcinga1Cfg.pm
@@ -200,6 +200,10 @@ sub parse_icinga1_object_cfg {
                 ) {
                 $val = Icinga2::Utils::strip_object_name($val);
             }
+            # treat 'null' (disable) as '0'
+            if ($val eq "null") {
+                $val = 0;
+            }
 
             $cfg_obj->{$type}->{$cfg_obj->{'type_cnt'}->{$type}}->{$attr} = $val;
 





More information about the icinga-checkins mailing list