[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a

David GUENAULT dguenault at monitoring-fr.org
Tue Feb 28 22:12:26 UTC 2012


The following commit has been merged in the debian/master branch:
commit 83544544f9092e4349586fc96a58e090f4e0b5d8
Author: David GUENAULT <dguenault at monitoring-fr.org>
Date:   Sun Jan 8 10:01:59 2012 +0100

    Added support for check_oracle_health installation for redhat/centos (only tested on 6 branch)

diff --git a/contrib/alternative-installation/shinken-install/shinken.conf b/contrib/alternative-installation/shinken-install/shinken.conf
index 3d9aa75..9919ab4 100644
--- a/contrib/alternative-installation/shinken-install/shinken.conf
+++ b/contrib/alternative-installation/shinken-install/shinken.conf
@@ -104,6 +104,7 @@ export NAGPLUGYUMPKG="gnutls-devel mysql-devel openssl-devel net-snmp-perl krb5-
 
 
 export CHECKORACLEHEALTHAPTPKG="libdbi-perl libaio1"
+export CHECKORACLEHEALTHYUMPKG="perl-DBI libaio"
 export CHECKORACLEHEALTHCPAN="http://search.cpan.org/CPAN/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.36.tar.gz"
 export CHECKORACLEHEALTH="http://labs.consol.de/wp-content/uploads/2011/09/check_oracle_health-1.7.3.tar.gz"
 
diff --git a/contrib/alternative-installation/shinken-install/shinken.sh b/contrib/alternative-installation/shinken-install/shinken.sh
index a61da38..e732d85 100755
--- a/contrib/alternative-installation/shinken-install/shinken.sh
+++ b/contrib/alternative-installation/shinken-install/shinken.sh
@@ -1390,64 +1390,66 @@ function install_check_oracle_health(){
 
 	if [ "$CODE" == "REDHAT" ]
 	then
-		cecho " > Unsuported" red
+		cecho " > installing prerequisites" green 
+		sudo apt-get -y install $CHECKORACLEHEALTHYUMPKG >> /tmp/shinken.install.log 2>&1 
 	else
 		cecho " > installing prerequisites" green 
 		sudo apt-get -y install $CHECKORACLEHEALTHAPTPKG >> /tmp/shinken.install.log 2>&1 
-		cecho " > installing cpan prerequisites" green
-		cd /tmp
-		for m in $CHECKORACLEHEALTHCPAN
-		do
-			filename=$(echo $m | awk -F"/" '{print $NF}')
-			if [ ! -f "$filename" ]
-			then
-				wget $WGETPROXY $m >> /tmp/shinken.install.log 2>&1 
-				if [ $? -ne 0 ]
-				then
-					cecho " > Error while downloading $m" red
-					exit 2
-				fi
-			fi	
-			tar zxvf $filename  >> /tmp/shinken.install.log 2>&1 
-			cd $(echo $filename | sed -e "s/\.tar\.gz//g")
-			perl Makefile.PL >> /tmp/shinken.install.log 2>&1 
-			make >> /tmp/shinken.install.log 2>&1 
+	fi
+	cecho " > installing cpan prerequisites" green
+	cd /tmp
+	for m in $CHECKORACLEHEALTHCPAN
+	do
+		filename=$(echo $m | awk -F"/" '{print $NF}')
+		if [ ! -f "$filename" ]
+		then
+			wget $WGETPROXY $m >> /tmp/shinken.install.log 2>&1 
 			if [ $? -ne 0 ]
 			then
-				cecho " > There was an error building module" red
+				cecho " > Error while downloading $m" red
 				exit 2
 			fi
-			make install  >> /tmp/shinken.install.log 2>&1 
-		done
-		cd /tmp
-		cecho " > Downloading check_oracle_health" green
-		wget $WGETPROXY $CHECKORACLEHEALTH >> /tmp/shinken.install.log 2>&1 
-		if [ $? -ne 0 ]
-		then
-			cecho " > Error while downloading $filename" red
-			exit 2
-		fi
-		cecho " > Extracting archive " green
-		filename=$(echo $CHECKORACLEHEALTH | awk -F"/" '{print $NF}')
-		tar zxvf $filename >> /tmp/shinken.install.log 2>&1 
+		fi	
+		tar zxvf $filename  >> /tmp/shinken.install.log 2>&1 
 		cd $(echo $filename | sed -e "s/\.tar\.gz//g")
-		./configure --prefix=$TARGET --with-nagios-user=$SKUSER --with-nagios-group=$SKGROUP --with-mymodules-dir=$TARGET/libexec --with-mymodules-dyn-dir=$TARGET/libexec --with-statefiles-dir=$TARGET/var/tmp >> /tmp/shinken.install.log 2>&1 
-		cecho " > Building plugin" green
+		perl Makefile.PL >> /tmp/shinken.install.log 2>&1 
 		make >> /tmp/shinken.install.log 2>&1 
-		if [ $? -ne 0 ] 
-		then
-			cecho " > Error while building check_oracle_health module" red
-			exit 2
-		fi
-		make check >> /tmp/shinken.install.log 2>&1 	
 		if [ $? -ne 0 ]
 		then
-			cecho " > Error while building check_oracle_health module" red
+			cecho " > There was an error building module" red
 			exit 2
 		fi
-		cecho " > Installing plugin" green
-		make install >> /tmp/shinken.install.log 2>&1 
+		make install  >> /tmp/shinken.install.log 2>&1 
+	done
+	cd /tmp
+	cecho " > Downloading check_oracle_health" green
+	wget $WGETPROXY $CHECKORACLEHEALTH >> /tmp/shinken.install.log 2>&1 
+	if [ $? -ne 0 ]
+	then
+		cecho " > Error while downloading $filename" red
+		exit 2
 	fi
+	cecho " > Extracting archive " green
+	filename=$(echo $CHECKORACLEHEALTH | awk -F"/" '{print $NF}')
+	tar zxvf $filename >> /tmp/shinken.install.log 2>&1 
+	cd $(echo $filename | sed -e "s/\.tar\.gz//g")
+	./configure --prefix=$TARGET --with-nagios-user=$SKUSER --with-nagios-group=$SKGROUP --with-mymodules-dir=$TARGET/libexec --with-mymodules-dyn-dir=$TARGET/libexec --with-statefiles-dir=$TARGET/var/tmp >> /tmp/shinken.install.log 2>&1 
+	cecho " > Building plugin" green
+	make >> /tmp/shinken.install.log 2>&1 
+	if [ $? -ne 0 ] 
+	then
+		cecho " > Error while building check_oracle_health module" red
+		exit 2
+	fi
+	make check >> /tmp/shinken.install.log 2>&1 	
+	if [ $? -ne 0 ]
+	then
+		cecho " > Error while building check_oracle_health module" red
+		exit 2
+	fi
+	cecho " > Installing plugin" green
+	make install >> /tmp/shinken.install.log 2>&1
+	mkdir -p $TARGET/var/tmp >> /tmp/shinke.install.log 2>&1 
 }
 
 # check_mysql_health

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list