From 78ab4a427f77dd88c6d793bae2f9f953e556c3b7 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Wed, 26 Nov 2003 14:14:20 +0000 Subject: we can't keep perl in memory if we want to eject cdrom --- move/tree/wait4x | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 move/tree/wait4x (limited to 'move/tree/wait4x') diff --git a/move/tree/wait4x b/move/tree/wait4x new file mode 100755 index 000000000..e8c2cfaba --- /dev/null +++ b/move/tree/wait4x @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +use MDK::Common; +use lib qw(/usr/lib/libDrakX); +use c; + +my $nb = 0; +$| = 1; +print "waiting for X"; +foreach (1..30) { + print "."; + sleep 1; + print("no X server :(\n"), exit 1 if !fuzzy_pidofs(qr/\b$_[0]\b/); + $nb++ if c::Xtest(':0'); + if ($nb > 2) { #- one succeeded test is not enough :-( + print "found\n"; + exit 0; + } +} +print "not found\n"; +exit 1; -- cgit v1.2.1