diff --git a/run-config.sh b/run-config.sh index c752e67dae046e2eafdc279167ada5ba00c6bb54..7d95bbaa062b280491406c73f195ddeb34c8d1e0 100755 --- a/run-config.sh +++ b/run-config.sh @@ -77,15 +77,22 @@ proxy="${phost} ${pport} ${puid} ${ppasswd}" inep="--inep=${inep}" +interface="" +if test $(route | grep default | wc -l) -gt 1; then + getNetworkInterface + interface="--nic=${interface}" +fi + # Execution if test $# -ne 1; then echo "Run.sh call: wrong number of parameters ($#)." \ >> ${dirname}/run.log exit 101 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 - retstr=$(${bindir}/client $1 ${url} ${proxy}) + retstr=$(${bindir}/client $1 ${url} ${proxy} ${interface}) retval=$? if test ${retval} -eq 4; then echo "$retstr" | tee -a ${dirname}/run.log