[icinga-checkins] icinga.org: icinga2/feature/configconvert-2743: configconvert: handle excluded hosts, ignore them on split to array

git at icinga.org git at icinga.org
Tue May 28 18:49:28 CEST 2013


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

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Tue May 28 15:53:58 2013 +0200

configconvert: handle excluded hosts, ignore them on split to array

exclusions/exceptions cannot be treated by icinga2 the same way as in
1.x so it's better to not create unwanted objects.

fixes #4007

---

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

diff --git a/contrib/configconvert/Icinga2/Utils.pm b/contrib/configconvert/Icinga2/Utils.pm
index 7ad2a31..47c7281 100644
--- a/contrib/configconvert/Icinga2/Utils.pm
+++ b/contrib/configconvert/Icinga2/Utils.pm
@@ -100,8 +100,8 @@ sub str2arr_by_delim_without_excludes {
     my $exclude = shift;
     my @arr = ();
 
-    #grep { !/^!/ }
     @arr = map { s/^\s+//; s/\s+$//; $_ }
+            grep { !/^!/ }
             split (/$delim/, $str);
 
     if ($sort == 1) {





More information about the icinga-checkins mailing list