summaryrefslogtreecommitdiffstats
path: root/move/tree/X_move
diff options
context:
space:
mode:
Diffstat (limited to 'move/tree/X_move')
-rwxr-xr-xmove/tree/X_move7
1 files changed, 7 insertions, 0 deletions
diff --git a/move/tree/X_move b/move/tree/X_move
index 0656468ad..54f30f81e 100755
--- a/move/tree/X_move
+++ b/move/tree/X_move
@@ -1,7 +1,14 @@
#!/bin/bash
ok=0
+lastdate0=0
while [ "$ok" == 0 -a ! -s /var/run/rebootctl ]; do
+ lastdate1=$lastdate0
+ lastdate0=`date +%s`
+ if [ `expr $lastdate0 - $lastdate1` -lt 10 ]; then
+ echo "X server respawning too fast :("
+ exit 1
+ fi
X $@
ok=$?
done