From 2dbd41d508c2452420a5fbdb07e93da89e517d08 Mon Sep 17 00:00:00 2001
From: Erik Alexandre Pucci <eap08@c3sl.ufpr.br>
Date: Tue, 23 Aug 2011 17:26:03 -0300
Subject: [PATCH] use/bandwidth-usage.tree: Added $FIRST_EXECUTION test(1)

If it's the first time execution of the agent, do not collect network data
and exit without error.

Signed-off-by: Erik Alexandre Pucci <eap08@c3sl.ufpr.br>
Acked-by: Klismann Smoger Mottin <ksm09@inf.ufpr.br>
Signed-off-by: Josiney de Souza <josineys@c3sl.ufpr.br>
---
 scripts/collect/use/bandwidth-usage.tree | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/collect/use/bandwidth-usage.tree b/scripts/collect/use/bandwidth-usage.tree
index d088c53..e64ec59 100755
--- a/scripts/collect/use/bandwidth-usage.tree
+++ b/scripts/collect/use/bandwidth-usage.tree
@@ -155,8 +155,8 @@ PREFIX="$(dirname $(readlink -f $0))"
 PROJECT=$PREFIX/../project/source.int
 
 # Verify if this is not an UCA Classmate, UCA Server nor Projector ProInfo. If
-# it is, do not collect network data and exit
-if test "$(bash $PROJECT)" != "0"; then
+# it is, or if it's the first execution, do not collect network data and exit
+if test "$(bash $PROJECT)" != "0" -o "${FIRST_EXECUTION}"; then
     exit 0
 fi
 
-- 
GitLab