From fd4e9ec3872bfb1751bc98e8db215b09840771fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Wed, 24 Aug 2011 13:08:04 +0000 Subject: [PATCH] - Install elsewhere - Recognize new options --- org.glite.lb.nagios/Makefile | 5 ++--- org.glite.lb.nagios/src/LB-probe | 12 +++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/org.glite.lb.nagios/Makefile b/org.glite.lb.nagios/Makefile index efddae5..1ce5411 100644 --- a/org.glite.lb.nagios/Makefile +++ b/org.glite.lb.nagios/Makefile @@ -3,15 +3,14 @@ stagedir=. package=emi-nagios-lb version=0.0.0 prefix= -LOCATION=/lib64/nagios/plugins/contrib/ INSTALL=install -include Makefile.inc -include ${top_srcdir}/project/version.properties install: - mkdir -p ${DESTDIR}${PREFIX}${prefix}/lib64/nagios/plugins/contrib - ${INSTALL} -m 0755 src/LB-probe ${DESTDIR}${PREFIX}${prefix}/lib64/nagios/plugins/contrib/check_lb_server + mkdir -p ${DESTDIR}${PREFIX}${prefix}/libexec/grid-monitoring/probes/emi.lb + ${INSTALL} -m 0755 src/LB-probe ${DESTDIR}${PREFIX}${prefix}/libexec/grid-monitoring/probes/emi.lb stage: $(MAKE) install PREFIX=${stagedir} diff --git a/org.glite.lb.nagios/src/LB-probe b/org.glite.lb.nagios/src/LB-probe index 51e5ded..81f4fc5 100755 --- a/org.glite.lb.nagios/src/LB-probe +++ b/org.glite.lb.nagios/src/LB-probe @@ -43,12 +43,14 @@ Console output: EndHelpHeader - echo "Usage: $progname [-h] [-v[v[v]]] [server[:port]]" + echo "Usage: $progname [-h] [-v[v[v]]] [-H server] [-p port] [server[:port]]" echo "Options:" echo " -h | --help Show this help message." echo " -v[vv] Verbosity level." - echo " server: Environmental variables are used if unspecified" - echo " port: Environmental variables or defaults are used if unspecified)" + echo " -H server" + echo " -p port" + echo " Environmental variables are used if unspecified" + echo " Environmental variables or defaults are used if unspecified)" echo "" } @@ -120,6 +122,7 @@ function log_cleared() } VERBLEVEL=0 +TIMEOUT=0 while test -n "$1" do @@ -128,6 +131,9 @@ do "-v" ) VERBLEVEL=$(( $VERBLEVEL + 1 )) ;; "-vv" ) VERBLEVEL=$(( $VERBLEVEL + 2 )) ;; "-vvv" ) VERBLEVEL=$(( $VERBLEVEL + 3 )) ;; + "-H" ) shift && SRVPORT="${1}$SRVPORT" ;; + "-p" ) shift && SRVPORT="$SRVPORT:${1}" ;; + "-t" ) shift && TIMEOUT=$1 ;; *) SRVPORT="$1" ;; # "-t" | "--text") setOutputASCII ;; esac -- 1.8.2.3