diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-11-26 14:14:20 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-11-26 14:14:20 +0000 |
commit | 78ab4a427f77dd88c6d793bae2f9f953e556c3b7 (patch) | |
tree | 4a71560526e41d5c28c2ef20576eb0c3366be8aa /move/tree/startkde_move | |
parent | a9d3ceafe12844e022fb835b45eb22494d2c92ed (diff) | |
download | drakx-backup-do-not-use-78ab4a427f77dd88c6d793bae2f9f953e556c3b7.tar drakx-backup-do-not-use-78ab4a427f77dd88c6d793bae2f9f953e556c3b7.tar.gz drakx-backup-do-not-use-78ab4a427f77dd88c6d793bae2f9f953e556c3b7.tar.bz2 drakx-backup-do-not-use-78ab4a427f77dd88c6d793bae2f9f953e556c3b7.tar.xz drakx-backup-do-not-use-78ab4a427f77dd88c6d793bae2f9f953e556c3b7.zip |
we can't keep perl in memory if we want to eject cdrom
Diffstat (limited to 'move/tree/startkde_move')
-rwxr-xr-x | move/tree/startkde_move | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/move/tree/startkde_move b/move/tree/startkde_move index a9d1d53ce..9169add40 100755 --- a/move/tree/startkde_move +++ b/move/tree/startkde_move @@ -1,32 +1,10 @@ -#!/usr/bin/perl - -use MDK::Common; -use lib qw(/usr/lib/libDrakX); -use c; - -sub wait4x() { - my $nb = 0; - foreach (1..30) { - sleep 1; - print("no X server :("), exit 1 if !fuzzy_pidofs(qr/\bX_move\b/); - $nb++ if c::Xtest(':0'); - if ($nb > 2) { #- one succeeded test is not enough :-( - return; - } - } - exit 1; -} - -my ($kde_ok, $xwait); - -while (1) { - wait4x(); - if (!($xwait = fork())) { - exec 'xwait', '-permanent'; #- so that server doesn't blink when startkde finishes - } - my ($xdim) = `xdpyinfo` =~ /dimensions:\s*(\d+)/; - system("qiv --root /image/move/BOOT-$xdim-MOVE.jpg"); - system('startkde'); - system('sudo killall X'); - waitpid $xwait, 0; -} +#!/bin/sh + +while true; do + wait4x || exit 1 + xwait -permanent & + xdim=`xdpyinfo | perl -ne 'print $1 if /dimensions:\s*(\d+)/'` + qiv --root /image/move/BOOT-$xdim-MOVE.jpg + startkde + sudo killall X +done |