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

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


The following commit has been merged in the debian/master branch:
commit 93d9e04a7872a64897be1a18a0ad5fabad4c75ec
Author: David GUENAULT <dguenault at monitoring-fr.org>
Date:   Sun Jan 8 08:54:25 2012 +0100

    Added check_wmi_plus installation support for Redhat/Centos (need testing)

diff --git a/contrib/alternative-installation/shinken-install/shinken.conf b/contrib/alternative-installation/shinken-install/shinken.conf
index 76e6fab..3d9aa75 100644
--- a/contrib/alternative-installation/shinken-install/shinken.conf
+++ b/contrib/alternative-installation/shinken-install/shinken.conf
@@ -121,6 +121,7 @@ export MKPREFIX="/usr/local/check_mk"
 export MKAPTPKG="libapache2-mod-python"
 
 export WMICAPTPKG="autoconf python libdatetime-perl libnagios-plugin-perl libconfig-inifiles-perl"
+export WMICYUMPKG="autoconf python perl-DateTime perl-Config-IniFiles"
 export WMIC="http://dev.zenoss.org/svn/trunk/inst/externallibs/wmi-1.3.13.tar.bz2"
 export CHECKWMIPLUS="http://edcint.co.nz/checkwmiplus/sites/default/files/check_wmi_plus.v1.49.tar.gz"
 
diff --git a/contrib/alternative-installation/shinken-install/shinken.sh b/contrib/alternative-installation/shinken-install/shinken.sh
index f32d95e..a61da38 100755
--- a/contrib/alternative-installation/shinken-install/shinken.sh
+++ b/contrib/alternative-installation/shinken-install/shinken.sh
@@ -1312,60 +1312,60 @@ function install_check_wmi_plus(){
 
 	if [ "$CODE" == "REDHAT" ]
 	then
-		cecho " > Unsuported" red
+		cecho " > installing prerequisites" green 
+		yum -yq install $WMICYUMPKG >> /tmp/shinken.install.log 2>&1 
 	else
 		cecho " > installing prerequisites" green 
-		sudo apt-get -y install $WMICAPTPKG >> /tmp/shinken.install.log 2>&1 
-		cd /tmp
-		cecho " > Downloading wmic" green
-		filename=$(echo $WMIC | awk -F"/" '{print $NF}')
-		if [ ! -f $(echo $filename | sed -e "s/\.bz2//g") ]
-		then
-			wget $WGETPROXY $WMIC >> /tmp/shinken.install.log 2>&1 
-			bunzip2 $filename
-		else
-			rm -Rf $(echo $filename | sed -e "s/\.tar//g")
-		fi
-		if [ $? -ne 0 ]
-		then
-			cecho " > Error while downloading $filename" red
-			exit 2
-		fi
-		cecho " > Extracting archive " green
-		tar xvf $(echo $filename| sed -e "s/\.bz2//g") >> /tmp/shinken.install.log 2>&1 
-		cd $(echo $filename | sed -e "s/\.tar\.bz2//g")
-		cecho " > Building wmic" green
-		make >> /tmp/shinken.install.log 2>&1 
-		if [ $? -ne 0 ] 
-		then
-			cecho " > Error while building wmic" red
-			exit 2
-		fi
-		cecho " > Installing wmic" green
-		cp Samba/source/bin/wmic $TARGET/libexec/
-		chown $SKUSER:$SKGROUP Samba/source/bin/wmic
-		cd /tmp
-		cecho " > Downloading check_wmi_plus" green
-		filename=$(echo $CHECKWMIPLUS | awk -F"/" '{print $NF}')
-		folder=$(echo $filename | sed -e "s/\.tar\.gz//g")
-		if [ ! -f "$filename" ]
-		then
-			wget $WGETPROXY $CHECKWMIPLUS >> /tmp/shinken.install.log 2>&1  
-		fi
-		cecho " > Extracting archive" green
-		tar zxvf $filename >> /tmp/shinken.install.log 2>&1 
-		cecho " > Installing plugin" green
-		cp check_wmi_plus.conf.sample $TARGET/libexec/check_wmi_plus.conf 
-		cp check_wmi_plus.pl $TARGET/libexec/check_wmi_plus.pl
-		cp -R /tmp/check_wmi_plus.d $TARGET/libexec/
-		chown $SKUSER:$SKGROUP $TARGET/libexec/check_wmi_plus* 
-		cecho " > configuring plugin" green
-		sed -i "s#/usr/lib/nagios/plugins#"$TARGET"/libexec#g" $TARGET/libexec/check_wmi_plus.conf
-		sed -i "s#/bin/wmic#"$TARGET"/libexec/wmic#g" $TARGET/libexec/check_wmi_plus.conf
-		sed -i "s#/opt/nagios/bin/plugins#"$TARGET"/libexec#g" $TARGET/libexec/check_wmi_plus.pl
-		sed -i "s#/usr/lib/nagios/plugins#"$TARGET"/libexec#g" $TARGET/libexec/check_wmi_plus.pl
-		
+		sudo apt-get -y install $WMICAPTPKG >> /tmp/shinken.install.log 2>&1
+	fi 
+	cd /tmp
+	cecho " > Downloading wmic" green
+	filename=$(echo $WMIC | awk -F"/" '{print $NF}')
+	if [ ! -f $(echo $filename | sed -e "s/\.bz2//g") ]
+	then
+		wget $WGETPROXY $WMIC >> /tmp/shinken.install.log 2>&1 
+		bunzip2 $filename
+	else
+		rm -Rf $(echo $filename | sed -e "s/\.tar//g")
+	fi
+	if [ $? -ne 0 ]
+	then
+		cecho " > Error while downloading $filename" red
+		exit 2
+	fi
+	cecho " > Extracting archive " green
+	tar xvf $(echo $filename| sed -e "s/\.bz2//g") >> /tmp/shinken.install.log 2>&1 
+	cd $(echo $filename | sed -e "s/\.tar\.bz2//g")
+	cecho " > Building wmic" green
+	make >> /tmp/shinken.install.log 2>&1 
+	if [ $? -ne 0 ] 
+	then
+		cecho " > Error while building wmic" red
+		exit 2
+	fi
+	cecho " > Installing wmic" green
+	cp Samba/source/bin/wmic $TARGET/libexec/
+	chown $SKUSER:$SKGROUP Samba/source/bin/wmic
+	cd /tmp
+	cecho " > Downloading check_wmi_plus" green
+	filename=$(echo $CHECKWMIPLUS | awk -F"/" '{print $NF}')
+	folder=$(echo $filename | sed -e "s/\.tar\.gz//g")
+	if [ ! -f "$filename" ]
+	then
+		wget $WGETPROXY $CHECKWMIPLUS >> /tmp/shinken.install.log 2>&1  
 	fi
+	cecho " > Extracting archive" green
+	tar zxvf $filename >> /tmp/shinken.install.log 2>&1 
+	cecho " > Installing plugin" green
+	cp check_wmi_plus.conf.sample $TARGET/libexec/check_wmi_plus.conf 
+	cp check_wmi_plus.pl $TARGET/libexec/check_wmi_plus.pl
+	cp -R /tmp/check_wmi_plus.d $TARGET/libexec/
+	chown $SKUSER:$SKGROUP $TARGET/libexec/check_wmi_plus* 
+	cecho " > configuring plugin" green
+	sed -i "s#/usr/lib/nagios/plugins#"$TARGET"/libexec#g" $TARGET/libexec/check_wmi_plus.conf
+	sed -i "s#/bin/wmic#"$TARGET"/libexec/wmic#g" $TARGET/libexec/check_wmi_plus.conf
+	sed -i "s#/opt/nagios/bin/plugins#"$TARGET"/libexec#g" $TARGET/libexec/check_wmi_plus.pl
+	sed -i "s#/usr/lib/nagios/plugins#"$TARGET"/libexec#g" $TARGET/libexec/check_wmi_plus.pl
 }
 
 # check_oracle_health

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list