[icinga-checkins] icinga.org: icinga-core/fholzer/core: Use here document instead of print

git at icinga.org git at icinga.org
Sat Apr 21 20:23:45 CEST 2012


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

Author: Alexander Wirt <formorer at debian.org>
Date:   Sat Apr 21 10:26:46 2012 +0200

Use here document instead of print

---

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

diff --git a/tools/icinga_verification.pl b/tools/icinga_verification.pl
index 0b90732..7d9e613 100644
--- a/tools/icinga_verification.pl
+++ b/tools/icinga_verification.pl
@@ -235,29 +235,35 @@ if (!$dbh_cfg_error){
 # Test Print Out
 # later create a fileout with the output
 
-print "\n ############################################################";
-print "\n ######   Icinga Verification and Reporting Script     ######";
-print "\n ######  by Frankstar / Team Quality Assurance & VM    ######";
-print "\n ############################################################";
-print "\n $perlversion";
-print " Current Date/Time on Server: $date";
-print "\n OS Information:\n";
-print " OS Name: @distriinfo";
-print " Kernel Version: $osversion";
-print " Environment-$LANG";
-print "\n Webserver Information:\n";
-print @apacheinfo, "\n";
-print "\n PHP Information:\n $phpversion";
-print "\n MySQL Information:\n $mysqlver\n";
-print "\n Icinga Informations:\n";
-print " idomod Connections: $idocheck\n";
-print " Icinga DB-Version: $result_icingadb[0]\n";
-print "\n ido2db last Connection Info:\n";
-print " @result_icingaconninfo";
-# ido2db.cfg mysql Test Connection
+print <<EOF;
+############################################################
+######   Icinga Verification and Reporting Script     ######
+######  by Frankstar / Team Quality Assurance & VM    ######
+############################################################
+Perlversion: $perlversion
+Current Date/Time on Server: $date
+OS Information:
+  OS Name: ", get_distribution,
+  Kernel Version: $osversion";
+  LC_LANG: $LANG
+Webserver Information: ";
+  @apacheinfo
+PHP Information: $phpversion
+MySQL Information:
+ $mysqlver
+Icinga Informations:
+ idomod Connections: $idocheck
+ Icinga DB-Version: $result_icingadb[0]
+ ido2db last Connection Info:
+ @result_icingaconninfo
+ido2db.cfg mysql Test Connection
+EOF
+
 print color("red"), "\n $dbh_cfg_error\n", color("reset");
+print <<EOF;
 #Check Services
-print " Process Status:\n";
+Process Status:
+EOF
 
 my @services = ('httpd', 'mysqld', 'snmptt', 'icinga', 'ido2db');
  





More information about the icinga-checkins mailing list