aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-12-04 00:49:51 +0100
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-12-04 00:49:51 +0100
commitf7ba08cc97cf599f6f2afe50ec9e619a8cccea46 (patch)
tree1d564ad1a261d707555072013c46fd922823d0e1
parent1e56ea4a43c013b779b7a7f0d8e214c8e2801d07 (diff)
downloadxen-f7ba08cc97cf599f6f2afe50ec9e619a8cccea46.tar.gz
xen-f7ba08cc97cf599f6f2afe50ec9e619a8cccea46.tar.bz2
xen-f7ba08cc97cf599f6f2afe50ec9e619a8cccea46.zip
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>
-rw-r--r--tools/examples/xen-hotplug-common.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/examples/xen-hotplug-common.sh b/tools/examples/xen-hotplug-common.sh
index 6a9df2d4d8..d4ebedf9e7 100644
--- a/tools/examples/xen-hotplug-common.sh
+++ b/tools/examples/xen-hotplug-common.sh
@@ -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