aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2010-05-20 10:52:25 +0200
committerAndi Kleen <ak@linux.intel.com>2010-05-20 10:52:25 +0200
commitbc405c55d328a170f068b50fc52930d4795923a4 (patch)
tree32a40d62858df0c688168fb08fe1362eb8b70ee0
parent019904b37bad2af70b188cb2813cd8f10f3ecf12 (diff)
downloadmce-test-bc405c55d328a170f068b50fc52930d4795923a4.tar.gz
random_offline: fix endless run without -t argument
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rwxr-xr-xtsrc/random_offline10
1 files changed, 6 insertions, 4 deletions
diff --git a/tsrc/random_offline b/tsrc/random_offline
index adb68f7..27eef6b 100755
--- a/tsrc/random_offline
+++ b/tsrc/random_offline
@@ -133,10 +133,12 @@ while true ; do
rm offlined
fi
- ((DIFF = $(date +%s) - $start))
- if [ ! -z "$RUNTIME" -a $DIFF -gt "$RUNTIME" ] ; then
- echo time over
- break
+ if [ ! -z "$RUNTIME" ] ; then
+ ((DIFF = $(date +%s) - $start))
+ if [ $DIFF -gt "$RUNTIME" ] ; then
+ echo time over
+ break
+ fi
fi
done