summaryrefslogtreecommitdiffstats
path: root/move/tree/mdk_totem
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-11-18 15:30:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-11-18 15:30:10 +0000
commit45026fc32729cbec056ed8713a2d0256e89ec56f (patch)
treef7989ef609c6a048497223bc40b6adbd5ea20593 /move/tree/mdk_totem
parent54063b8cdf55bf0c420c26e5cae27769d8bd5c8c (diff)
downloaddrakx-45026fc32729cbec056ed8713a2d0256e89ec56f.tar
drakx-45026fc32729cbec056ed8713a2d0256e89ec56f.tar.gz
drakx-45026fc32729cbec056ed8713a2d0256e89ec56f.tar.bz2
drakx-45026fc32729cbec056ed8713a2d0256e89ec56f.tar.xz
drakx-45026fc32729cbec056ed8713a2d0256e89ec56f.zip
don't even try to do something when some very important processes make the cd busy
Diffstat (limited to 'move/tree/mdk_totem')
-rwxr-xr-xmove/tree/mdk_totem18
1 files changed, 17 insertions, 1 deletions
diff --git a/move/tree/mdk_totem b/move/tree/mdk_totem
index 63b42285e..c634118dd 100755
--- a/move/tree/mdk_totem
+++ b/move/tree/mdk_totem
@@ -46,7 +46,23 @@ sub remove_simple_daemons {
my $in = interactive->vnew;
-if (my @busy = remove_simple_daemons(busy_pids_and_files())) {
+my @busy = busy_pids_and_files();
+
+my @needed_processes = (
+ 'init',
+ 'xfs',
+ 'kdeinit: Running...',
+ '/etc/X11/X',
+ '/sbin/devfsd',
+ );
+
+if (find { member($_->{cmdline}, @needed_processes) } @busy) {
+ exec 'totem' if $in->ask_okcancel('', N("You can only run with no CDROM support"));
+ $in->exit(1);
+}
+
+@busy = remove_simple_daemons(@busy);
+if (@busy) {
warn '*' x 80, "\n";
warn join("\n", "$_->{exe} ($_->{cmdline}) =>", map { " $_" } @{$_->{files}}) . "\n" foreach @busy;
warn '*' x 80, "\n";