mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Use test ([) instead of expr to compare integers.
expr $int1 '<' $int2 seems to be broken on some shells. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
1e56ea4a43
commit
f7ba08cc97
1 file changed
+2
-2
@@ -119,7 +119,7 @@ _claim_lock()
|
||||
local owner=$(_lock_owner "$lockdir")
|
||||
local retries=0
|
||||
|
||||
while expr $retries '<' $LOCK_RETRIES
|
||||
while [ $retries -lt $LOCK_RETRIES ]
|
||||
do
|
||||
mkdir "$lockdir" && trap "release_lock $1; sigerr" ERR &&
|
||||
_update_lock_info "$lockdir" && return
|
||||
@@ -131,7 +131,7 @@ _claim_lock()
|
||||
retries=0
|
||||
fi
|
||||
|
||||
if expr $retries '>' $LOCK_SPINNING_RETRIES
|
||||
if [ $retries -gt $LOCK_SPINNING_RETRIES ]
|
||||
then
|
||||
sleep $LOCK_SLEEPTIME
|
||||
else
|
||||
|
||||