From c3f3f1513e65613180a1a45273b921d06e2b4327 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 Oct 2010 17:31:28 +0200 Subject: FusionInventory-Agent-2.1.6 - not working yet, because of http://forge.fusioninventory.org/issues/414 --- fusioninventory-agent.init | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'fusioninventory-agent.init') diff --git a/fusioninventory-agent.init b/fusioninventory-agent.init index aacadab..65fd96d 100755 --- a/fusioninventory-agent.init +++ b/fusioninventory-agent.init @@ -27,6 +27,7 @@ do_start() # Read configuration i=0 OPTS= + SERVERS= while [ $i -lt ${#OCSMODE[*]} ] do if [ ${OCSMODE[$i]:-none} == daemon ]; then @@ -38,11 +39,18 @@ do_start() OPTS="$OPTS --local=/var/lib/$prog" elif [ ! -z "${OCSSERVER[$i]}" ]; then # Remote inventory - OPTS="$OPTS --server=${OCSSERVER[$i]}" + if [ -z "$SERVERS" ]; then + SERVERS=${OCSSERVER[$i]} + else + SERVERS="$SERVERS,${OCSSERVER[$i]}" + fi fi fi ((i++)) done + if [ -n "$SERVERS" ]; then + OPTS="$OPTS --server=$SERVERS" + fi if [ -n "$OPTS" ]; then echo -n $"Starting $prog: " daemon $prog --logfile=$logfile $FUSINVOPT --daemon $OPTS 2>/dev/null -- cgit