From b3ef7f59e2c7e7ea232b4a22bfaf423cd747c2a7 Mon Sep 17 00:00:00 2001 From: Zhai Edwin Date: Mon, 27 Sep 2010 21:16:16 +0800 Subject: xtscal: Fix the endless loop when starting X xtscal script in Xsession.d would lead endless loop if /etc/pointercal is missing, which make the system hang. This fix adds a counter for loop. [BUGID #251] got fixed by this. Signed-off-by: Zhai Edwin --- meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meta/recipes-graphics/xtscal') diff --git a/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh b/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh index ee55784548..b8383bf86b 100644 --- a/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh +++ b/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh @@ -3,8 +3,11 @@ . /etc/formfactor/config if [ "$HAVE_TOUCHSCREEN" = "1" ]; then - while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ] + n=1 + while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ] && [ $n -le 5 ] do /usr/bin/xtscal + sleep 1 + let "n += 1" done fi -- cgit 1.2.3-korg