From 45026fc32729cbec056ed8713a2d0256e89ec56f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 18 Nov 2003 15:30:10 +0000 Subject: don't even try to do something when some very important processes make the cd busy --- move/tree/mdk_totem | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'move') 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"; -- cgit v1.2.1