[icinga-checkins] icinga.org: icinga-core/fholzer/core: Remove more `` and use localtime() instead of `date`

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


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

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

Remove more `` and use localtime() instead of `date`

---

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

diff --git a/tools/icinga_verification.pl b/tools/icinga_verification.pl
index 80ac02e..f6cc933 100644
--- a/tools/icinga_verification.pl
+++ b/tools/icinga_verification.pl
@@ -97,7 +97,13 @@ if (!$icinga_base){
 my $perlversion = $^V;
 
 # Kernel version
-my $osversion = `uname -rp` ;
+my $osversion = qx(uname -rp) ;
+
+# lets try to find out what distribution we have.. 
+# that isn't as easy as it sounds. 
+
+# first try: LSB
+
 
 # search for OS Information Files
 my @files = `find /etc -maxdepth 1 -name *-release 2>/dev/null`;
@@ -111,10 +117,10 @@ if (@files == 0) {
 }
 
 # PHP Version
-my @phpversion = `php -v`;
+my @phpversion = qx(php -v);
 
 #Current Time/Date
-my $date = `date`;
+my $date = localtime();
 
 #Apache Info
 my @apacheinfo = `httpd -V`;





More information about the icinga-checkins mailing list