summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-11-27 15:39:57 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-11-27 15:39:57 +0000
commit279ce5fa345165f46de6c27d03224e23e291f692 (patch)
tree9120bdb6dd05a6fab4392e98b152fbe8b22c3c54
parent6d98b5b7d6a61fe53fdc628fec73841bf5a0a50e (diff)
downloaddrakx-279ce5fa345165f46de6c27d03224e23e291f692.tar
drakx-279ce5fa345165f46de6c27d03224e23e291f692.tar.gz
drakx-279ce5fa345165f46de6c27d03224e23e291f692.tar.bz2
drakx-279ce5fa345165f46de6c27d03224e23e291f692.tar.xz
drakx-279ce5fa345165f46de6c27d03224e23e291f692.zip
try to not respawn X too fast
-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