correct while loop using lsof
authorMarcel Poul <marcel.poul@cern.ch>
Sun, 19 Feb 2012 14:11:14 +0000 (14:11 +0000)
committerMarcel Poul <marcel.poul@cern.ch>
Sun, 19 Feb 2012 14:11:14 +0000 (14:11 +0000)
org.glite.testsuites.ctb/CANL-C/tests/canl-test-sec-connection.sh

index d2fa9e3..3dae776 100755 (executable)
@@ -172,7 +172,8 @@ max_port=11190
 ${SYS_LSOF} -i :${nu_port}
 while [ $? -eq 0 -a ${nu_port} -lt ${max_port} ]
 do
-       nu_port=$(( ${nu_port} + 1 ))
+       nu_port=$((nu_port+1))
+       ${SYS_LSOF} -i :${nu_port}
 done
 if [ ${nu_port} -ne ${max_port} ]; then
        ${EMI_CANL_CLIENT} -s localhost -p 11112