diff --git a/run-config.sh b/run-config.sh
index ecdef85779be0999bc495ac1adca771f38683f8f..8596010410c421f4376b10beffb8d6535b9c96c5 100755
--- a/run-config.sh
+++ b/run-config.sh
@@ -62,8 +62,13 @@ ppasswd=
 date +"%F %T" >> ${dirname}/run.log
 # Execution
 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
-    ${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
 EOF