[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a
David GUENAULT
dguenault at monitoring-fr.org
Tue Feb 28 22:21:48 UTC 2012
The following commit has been merged in the debian/master branch:
commit 6076c775875b1ff93a63155afb121617ba81294e
Author: David GUENAULT <dguenault at monitoring-fr.org>
Date: Sun Feb 19 08:43:47 2012 +0100
First step to skip prerequisites
diff --git a/contrib/alternative-installation/shinken-install/shinken.conf b/contrib/alternative-installation/shinken-install/shinken.conf
index bf1da6a..775afe3 100644
--- a/contrib/alternative-installation/shinken-install/shinken.conf
+++ b/contrib/alternative-installation/shinken-install/shinken.conf
@@ -19,9 +19,12 @@
#You should have received a copy of the GNU Affero General Public License
#along with Shinken. If not, see <http://www.gnu.org/licenses/>.
+# temporary path
export TMP=${TMP:-"/tmp"}
# proxy support
export USEPROXY=${USEPROXY:-0}
+# Skip prerequisites installation
+export SKIPPREREQUISITES=${SKIPPREREQUISITES:-0}
# for shinken
export VERSION=${VERSION:-"master"}
export TARGET=${TARGET:-"/usr/local/shinken"}
diff --git a/contrib/alternative-installation/shinken-install/shinken.sh b/contrib/alternative-installation/shinken-install/shinken.sh
index c563f0e..a937df1 100755
--- a/contrib/alternative-installation/shinken-install/shinken.sh
+++ b/contrib/alternative-installation/shinken-install/shinken.sh
@@ -330,14 +330,19 @@ function prerequisites(){
$QUERY $EPELNAME >> $TMP/shinken.install.log 2>&1
if [ $? -ne 0 ]
then
- cecho " > Installing $EPELPKG" yellow
- wget $WGETPROXY $EPEL >> $TMP/shinken.install.log 2>&1
- if [ $? -ne 0 ]
+ if [ $SKIPPREREQUISITES -eq 1 ]
then
- cecho " > Error while trying to download EPEL repositories" red
- exit 2
+ cecho " SKIPPREREQUISITES enabled : won't install $EPEL" red
+ else
+ cecho " > Installing $EPELPKG" yellow
+ wget $WGETPROXY $EPEL >> $TMP/shinken.install.log 2>&1
+ if [ $? -ne 0 ]
+ then
+ cecho " > Error while trying to download EPEL repositories" red
+ exit 2
+ fi
+ rpm -Uvh ./$EPELPKG >> $TMP/shinken.install.log 2>&1
fi
- rpm -Uvh ./$EPELPKG >> $TMP/shinken.install.log 2>&1
else
cecho " > $EPELPKG already installed" green
fi
@@ -363,12 +368,17 @@ function prerequisites(){
$QUERY $p >> $TMP/shinken.install.log 2>&1
if [ $? -ne 0 ]
then
- cecho " > Installing $p " yellow
- installpkg pkg $p
- if [ $? -ne 0 ]
- then
- cecho " > Error while trying to install $p" red
- exit 2
+ if [ $SKIPPREREQUISITES -eq 1 ]
+ then
+ cecho " > SKIPPREQUISITES enabled : won't install $p" red
+ else
+ cecho " > Installing $p " yellow
+ installpkg pkg $p
+ if [ $? -ne 0 ]
+ then
+ cecho " > Error while trying to install $p" red
+ exit 2
+ fi
fi
else
cecho " > Package $p already installed " green
@@ -379,18 +389,23 @@ function prerequisites(){
then
case $VERS in
5)
- # install setup tools for python 26
- export PY="python26"
- export PYEI="easy_install-2.6"
- if [ ! -d "setuptools-$SETUPTOOLSVERS" ]
+ if [ $SKIPPREREQUISITES -eq 1 ]
then
- cecho " > Downloading setuptools for python 2.6" green
- wget $WGETPROXY $RHELSETUPTOOLS >> $TMP/shinken.install.log 2>&1
- tar zxvf setuptools-$SETUPTOOLSVERS.tar.gz >> $TMP/shinken.install.log 2>&1
+ cecho " > SKIPPREQUISITES enabled : won't install $RHELSETUPTOOLS " red
+ else
+ # install setup tools for python 26
+ export PY="python26"
+ export PYEI="easy_install-2.6"
+ if [ ! -d "setuptools-$SETUPTOOLSVERS" ]
+ then
+ cecho " > Downloading setuptools for python 2.6" green
+ wget $WGETPROXY $RHELSETUPTOOLS >> $TMP/shinken.install.log 2>&1
+ tar zxvf setuptools-$SETUPTOOLSVERS.tar.gz >> $TMP/shinken.install.log 2>&1
+ fi
+ cecho " > Installing setuptools for python 2.6" green
+ cd setuptools-$SETUPTOOLSVERS >> $TMP/shinken.install.log 2>&1
+ python26 setup.py install >> $TMP/shinken.install.log 2>&1
fi
- cecho " > Installing setuptools for python 2.6" green
- cd setuptools-$SETUPTOOLSVERS >> $TMP/shinken.install.log 2>&1
- python26 setup.py install >> $TMP/shinken.install.log 2>&1
PYLIBS=$PYLIBSRHEL
;;
6)
@@ -407,8 +422,13 @@ function prerequisites(){
$PY $myscripts/tools/checkmodule.py -m $import >> $TMP/shinken.install.log 2>&1
if [ $? -eq 2 ]
then
- cecho " > Module $module ($import) not found. Installing..." yellow
- $PYEI $module >> $TMP/shinken.install.log 2>&1
+ if [ $SKIPPREREQUISITES -eq 1 ]
+ then
+ cecho " > SKIPPREQUISITES enabled : won't install $p " red
+ else
+ cecho " > Module $module ($import) not found. Installing..." yellow
+ $PYEI $module >> $TMP/shinken.install.log 2>&1
+ fi
else
cecho " > Module $module found." green
fi
@@ -428,13 +448,16 @@ function prerequisites(){
$PY $myscripts/tools/checkmodule.py -m $import >> $TMP/shinken.install.log 2>&1
if [ $? -eq 2 ]
then
- cecho " > Module $module ($import) not found. Installing..." yellow
- $PYEI $module >> $TMP/shinken.install.log 2>&1
+ if [ $SKIPPREREQUISITES -eq 1 ]
+ then
+ cecho " > SKIPPREQUISITES enabled : won't install $p " red
+ else
+ cecho " > Module $module ($import) not found. Installing..." yellow
+ $PYEI $module >> $TMP/shinken.install.log 2>&1
+ fi
else
cecho " > Module $module found." green
fi
-
-
done
fi
--
UNNAMED PROJECT
More information about the Pkg-nagios-changes
mailing list