perfsonar-dev - perfsonar: r4187 - trunk/packaging/rpm/ps-mdm-flowsa-ma
Subject: perfsonar development work
List archive
- From:
- To:
- Subject: perfsonar: r4187 - trunk/packaging/rpm/ps-mdm-flowsa-ma
- Date: Mon, 14 Jul 2008 11:35:24 -0400
Author: gijs
Date: 2008-07-14 11:35:23 -0400 (Mon, 14 Jul 2008)
New Revision: 4187
Modified:
trunk/packaging/rpm/ps-mdm-flowsa-ma/ps-mdm-flowsa-ma.init
Log:
fixed startupscripts to use new michael format
Modified: trunk/packaging/rpm/ps-mdm-flowsa-ma/ps-mdm-flowsa-ma.init
===================================================================
--- trunk/packaging/rpm/ps-mdm-flowsa-ma/ps-mdm-flowsa-ma.init 2008-07-14
15:31:59 UTC (rev 4186)
+++ trunk/packaging/rpm/ps-mdm-flowsa-ma/ps-mdm-flowsa-ma.init 2008-07-14
15:35:23 UTC (rev 4187)
@@ -45,11 +45,18 @@
GROUP=`grep ^service\.ma\.flowsa\.nfcapd\.group $CONF | cut -f 2 -d =`
# get number of configured exporters && check if > 0
-#EXPNUM=`grep ^service\.ma\.flowsa\.exporter.*\.hostname $CONF | wc -l`
-EXPNUM=`grep ^service\.ma\.flowsa\.exporters $CONF | cut -f 2 -d =`
-if [[ $EXPNUM == 0 ]]; then
- log_failure_msg "ERROR: no exporters configured in $CONF"
- exit 1;
+EXPNUM=0
+for NUM in `seq 256`; do
+ ENABLED=`grep ^service\.common\.flow\.exporter\.$NUM\.enabled $CONF |
cut -f 2 -d =`
+ if [ -z $ENABLED ] || [ $ENABLED != true ]; then
+ break;
+ fi
+ EXPNUM=$NUM
+done
+
+if [ $EXPNUM == 0 ]; then
+ log_failure_msg "no exporters configured in $CONF"
+ exit 1;
fi
# get nfcapd storage location
@@ -63,16 +70,16 @@
start) echo -n "Starting PERFsonar flow-sa-ma collector(s)"
for NUM in `seq $EXPNUM`; do
# read hostname from properties file, and check if it exists
- HOST=`grep ^service\.ma\.flowsa\.exporter$NUM\.hostname $CONF
| cut -f 2 -d =`
+ HOST=`grep ^service\.common\.flow\.exporter\.$NUM\.address
$CONF | cut -f 2 -d =`
if [[ -z $HOST ]]; then
- log_failure_msg "ERROR:
service.ma.flowsa.exporter$NUM.hostname not defined in $CONF"
+ log_failure_msg "ERROR:
service.common.flow.exporter.$NUM.hostname not defined in $CONF"
exit 1
fi
# read port from properties file, and check if it exists
- PORT=`grep ^service\.ma\.flowsa\.exporter$NUM\.port $CONF |
cut -f 2 -d =`
+ PORT=`grep ^service\.common\.flow\.exporter\.$NUM\.port $CONF
| cut -f 2 -d =`
if [[ -z $PORT ]]; then
- log_failure_msg "ERROR:
service.ma.flowsa.exporter$NUM.PORT not defined in $CONF"
+ log_failure_msg "ERROR:
service.comon.flow.exporter.$NUM.port not defined in $CONF"
exit 1
fi
- perfsonar: r4187 - trunk/packaging/rpm/ps-mdm-flowsa-ma, svnlog, 07/14/2008
Archive powered by MHonArc 2.6.16.