[icinga-checkins] icinga.org: icinga-core/fholzer/core: Add debugging for which()

git at icinga.org git at icinga.org
Mon Apr 23 14:12:18 CEST 2012


Module: icinga-core
Branch: fholzer/core
Commit: d81244ba04df999f7977331e8266710518b585d4
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=d81244ba04df999f7977331e8266710518b585d4

Author: Alexander Wirt <formorer at grml.org>
Date:   Mon Apr 23 13:50:40 2012 +0200

Add debugging for which()

---

 tools/icinga_verification.pl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/icinga_verification.pl b/tools/icinga_verification.pl
index 3162d0a..c3f16c4 100644
--- a/tools/icinga_verification.pl
+++ b/tools/icinga_verification.pl
@@ -53,7 +53,8 @@ my $config_ref = {
 # Option parsing
 ################################
 my $mysqldb = '';
-#my $result = GetOptions( "icingadb=s" => \$mysqldb );
+my $verbose; 
+my $result = GetOptions( "verbose" => \$verbose );
 
 ################################
 # Script Config
@@ -363,6 +364,7 @@ sub which (@) {
     my $icinga_path = "$icinga_base/../bin";
     my $icinga_path = "$icinga_base/../sbin";
     push @path, $icinga_path;
+    print "looking for binaries in ", join(",", @path), "\n" if $verbose;
 
     foreach my $binary (@binaries) {
         map { -x "$_/$binary" && return "$_/$binary" } @path;





More information about the icinga-checkins mailing list