diff options
| -rw-r--r-- | debian/changelog | 2 | ||||
| -rwxr-xr-x | sitesummary-nodes | 6 | 
2 files changed, 6 insertions, 2 deletions
| diff --git a/debian/changelog b/debian/changelog index 6bce679..1640421 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ sitesummary (0.0.70) UNRELEASED; urgency=low    * Improve LDAP server Nagios check, not only checking if the TCP      port is listening, but also check if the server will reply to      searches for the root DSE. +  * Adjust sitesummary-nodes code for generating Nagios configuration +    to avoid perl warnings when no default route is set for a host.   -- Petter Reinholdtsen <pere@debian.org>  Mon, 14 Nov 2011 11:42:16 +0100 diff --git a/sitesummary-nodes b/sitesummary-nodes index 6bf5794..970bdfe 100755 --- a/sitesummary-nodes +++ b/sitesummary-nodes @@ -268,8 +268,10 @@ sub generate_nagios_config {          for my $group ( @groups ) {              $hostgroup{$group} = 1;          } - -        my $defaultroute = get_dnsnameorip(get_default_route($hostid)); +        my $defaultrouteip = get_default_route($hostid); +        my $defaultroute; +        $defaultroute = get_dnsnameorip($defaultrouteip) +            if defined $defaultroute;          # Also check default route host          if (defined $defaultroute && !exists $hosts{$defaultroute}) { | 
