diff options
Diffstat (limited to 'move/tree/X_move')
-rwxr-xr-x | move/tree/X_move | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/move/tree/X_move b/move/tree/X_move index 54f30f81e..8059cbcba 100755 --- a/move/tree/X_move +++ b/move/tree/X_move @@ -1,12 +1,17 @@ #!/bin/bash ok=0 +lastdate2=0 +lastdate1=0 lastdate0=0 while [ "$ok" == 0 -a ! -s /var/run/rebootctl ]; do + lastdate3=$lastdate2 + lastdate2=$lastdate1 lastdate1=$lastdate0 lastdate0=`date +%s` - if [ `expr $lastdate0 - $lastdate1` -lt 10 ]; then - echo "X server respawning too fast :(" + if [ `expr $lastdate0 - $lastdate3` -lt 20 ]; then + echo "X server respawning too fast [ $lastdate0 : $lastdate1 : $lastdate2 : $lastdate3 ] :(" + while [ true ]; do sleep 10; done exit 1 fi X $@ |