From 766166d121944cd922e756a8ee05973ad1cad13d Mon Sep 17 00:00:00 2001
From: Erik Alexandre Pucci <eap08@c3sl.ufpr.br>
Date: Fri, 23 Apr 2010 09:51:03 -0300
Subject: [PATCH] run-config.sh: Changed to double quoted parameters in client
 calls

Changed to double quoted parameters to avoid shifting to left the other
arguments in case of null values. This change makes the client always get
the correct parameters.

Signed-off-by: Erik Alexandre Pucci <eap08@c3sl.ufpr.br>
Acked-by: Diego Giovane Pasqualin <dgp06@c3sl.ufpr.br>
Acked-by: Ricardo Tavares de Oliveira <rto07@c3sl.ufpr.br>
Acked-by: Vinicius Ruoso <vkr07@c3sl.ufpr.br>
Signed-off-by: Danilo K. S. Yorinori <danilok@c3sl.ufpr.br>
---
 run-config.sh | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/run-config.sh b/run-config.sh
index eb65ae3..2cf0002 100755
--- a/run-config.sh
+++ b/run-config.sh
@@ -66,19 +66,20 @@ date +"%F %T" >> ${dirname}/run.log
 if test $# -gt 1; then
     echo "Run.sh call: wrong number of parameters ($#)." >> run.log
 elif test $# -eq 0; then
-    ${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
 elif [[ $1 == "--update" ]]; then
-    retstr=$(${bindir}/client $1 ${url} ${inep} ${mac} ${phost} ${pport} \
-                                 ${puid} ${ppasswd} 2>> ${dirname}/run.log)
+    retstr=$(${bindir}/client $1 "${url}" "${inep}" "${mac}" "${phost}" \
+                                 "${pport}" "${puid}" "${ppasswd}" \
+                                            2>> ${dirname}/run.log)
     retval=$?
     if test ${retval} -eq 4; then
         echo "$retstr" | tee -a ${dirname}/run.log
     fi
     exit $retval
 elif [[ $1 == "--inventory" ]]; then
-    ${bindir}/client $1 ${url} ${inep} ${mac} ${phost} ${pport} ${puid} \
-                        ${ppasswd} >> ${dirname}/run.log 2>&1
+    ${bindir}/client "$1" "${url}" "${inep}" "${mac}" "${phost}" "${pport}" \
+                          "${puid}" "${ppasswd}" >> ${dirname}/run.log 2>&1
 else
     echo "Run.sh call: wrong parameter (\"$1\")." >> run.log
 fi
-- 
GitLab