diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-11-18 15:30:10 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-11-18 15:30:10 +0000 |
commit | 45026fc32729cbec056ed8713a2d0256e89ec56f (patch) | |
tree | f7989ef609c6a048497223bc40b6adbd5ea20593 /move | |
parent | 54063b8cdf55bf0c420c26e5cae27769d8bd5c8c (diff) | |
download | drakx-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')
-rwxr-xr-x | move/tree/mdk_totem | 18 |
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"; |