Skip to content
Snippets Groups Projects
Commit 89d36a43 authored by Vinicius Ruoso's avatar Vinicius Ruoso Committed by Danilo K. S. Yorinori
Browse files

run-config.sh: Added support to return the client binary return code


This is necessary because the collect agent must find out if it needs to
auto-update.

When calling run.sh with "--update" option, the collect agent must check if
the return code equals to 4 to update.

Signed-off-by: default avatarVinicius Ruoso <vkr07@c3sl.ufpr.br>
Acked-by: default avatarRicardo Tavares de Oliveira <rto07@c3sl.ufpr.br>
Acked-by: default avatarDiego Giovane Pasqualin <dgp06@c3sl.ufpr.br>
Acked-by: default avatarJosiney de Souza <josineys@c3sl.ufpr.br>
Signed-off-by: default avatarDanilo K. S. Yorinori <danilok@c3sl.ufpr.br>
parent b85baaca
Branches
No related tags found
No related merge requests found
...@@ -62,8 +62,13 @@ ppasswd= ...@@ -62,8 +62,13 @@ ppasswd=
date +"%F %T" >> ${dirname}/run.log date +"%F %T" >> ${dirname}/run.log
# Execution # Execution
if [[ $# == 1 && $1 == "--update" ]]; then if [[ $# == 1 && $1 == "--update" ]]; then
${bindir}/client $1 ${url} ${inep} ${mac} ${phost} ${pport} ${puid} ${ppasswd} 2>> ${dirname}/run.log | tee -a ${dirname}/run.log retstr=$(${bindir}/client $1 ${url} ${inep} ${mac} ${phost} ${pport} \
${puid} ${ppasswd} 2>> ${dirname}/run.log)
retval=$?
echo "$retstr" >> ${dirname}/run.log
exit $retval
else else
${bindir}/client ${url} ${inep} ${mac} ${phost} ${pport} ${puid} ${ppasswd} >> ${dirname}/run.log 2>&1 ${bindir}/client ${url} ${inep} ${mac} ${phost} ${pport} ${puid} \
${ppasswd} >> ${dirname}/run.log 2>&1
fi fi
EOF EOF
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment