Skip to content
Snippets Groups Projects
Commit b386d7c7 authored by Erik Alexandre Pucci's avatar Erik Alexandre Pucci Committed by Danilo K. S. Yorinori
Browse files

run-config.sh: Added network interface parameter when calling the client


The new parameter is obtained from getNetworkInterface() in "common.sh" file
when there is more than one default route set. Otherwise, the "interface"
variable will be an empty string.

Signed-off-by: default avatarErik Alexandre Pucci <eap08@c3sl.ufpr.br>
Acked-by: default avatarRicardo Tavares de Oliveira <rto07@c3sl.ufpr.br>
Signed-off-by: default avatarDanilo K. S. Yorinori <danilok@c3sl.ufpr.br>
parent 263f223e
No related branches found
No related tags found
No related merge requests found
...@@ -77,15 +77,22 @@ proxy="${phost} ${pport} ${puid} ${ppasswd}" ...@@ -77,15 +77,22 @@ proxy="${phost} ${pport} ${puid} ${ppasswd}"
inep="--inep=${inep}" inep="--inep=${inep}"
interface=""
if test $(route | grep default | wc -l) -gt 1; then
getNetworkInterface
interface="--nic=${interface}"
fi
# Execution # Execution
if test $# -ne 1; then if test $# -ne 1; then
echo "Run.sh call: wrong number of parameters ($#)." \ echo "Run.sh call: wrong number of parameters ($#)." \
>> ${dirname}/run.log >> ${dirname}/run.log
exit 101 exit 101
elif [[ $1 == "--inventory" ]]; then elif [[ $1 == "--inventory" ]]; then
${bindir}/client $1 ${url} ${inep} ${proxy} >> ${dirname}/run.log ${bindir}/client $1 ${url} ${inep} ${proxy} ${interface} \
>> ${dirname}/run.log
elif [[ $1 == "--update" ]]; then elif [[ $1 == "--update" ]]; then
retstr=$(${bindir}/client $1 ${url} ${proxy}) retstr=$(${bindir}/client $1 ${url} ${proxy} ${interface})
retval=$? retval=$?
if test ${retval} -eq 4; then if test ${retval} -eq 4; then
echo "$retstr" | tee -a ${dirname}/run.log echo "$retstr" | tee -a ${dirname}/run.log
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment