[icinga-checkins] icinga.org: icinga-core/fholzer/core: Use which to find mysql binary and use qx

git at icinga.org git at icinga.org
Fri Apr 20 20:42:05 CEST 2012


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

Author: Alexander Wirt <formorer at grml.org>
Date:   Fri Apr 20 16:09:17 2012 +0200

Use which to find mysql binary and use qx

mysql can be installed in various places, using which should
find it along the PATH. qx makes thinks better readable.

---

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

diff --git a/tools/icinga_verification.pl b/tools/icinga_verification.pl
index fe03785..6952261 100644
--- a/tools/icinga_verification.pl
+++ b/tools/icinga_verification.pl
@@ -39,7 +39,7 @@ if( $oscheck eq 'MSWin32' ){
 	exit;
 }
 # MySQL Config if MySQL is used
-my $mysqlcheck = `find /usr/bin -name mysql`;
+my $mysqlcheck = qx(which mysql);
 my $mysqldb = '';
 my $mysqlserver = '';
 my $mysqluser = '';





More information about the icinga-checkins mailing list