[icinga-checkins] icinga.org: icinga-core/fholzer/core: Also look into icinga prefix

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


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

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

Also look into icinga prefix

---

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

diff --git a/tools/icinga_verification.pl b/tools/icinga_verification.pl
index d182aee..3303e58 100644
--- a/tools/icinga_verification.pl
+++ b/tools/icinga_verification.pl
@@ -359,6 +359,10 @@ sub get_key_from_ini ($$) {
 
 sub which (@) {
     my @binaries = @_;
+    my @path = reverse( split( ':', $PATH ));
+    my $icinga_path = "$icinga_base/../";
+    push @path, $icinga_path;
+
     foreach my $binary (@binaries) {
         map { -x "$_/$binary" && return "$_/$binary" }
             reverse( split( ':', $PATH ) );





More information about the icinga-checkins mailing list