From 507bd7737a20d91e21d6d2b833b2344d94960a73 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 23 Apr 2004 11:56:25 +0000 Subject: handle --auto when managing removable media --- perl-install/diskdrake/removable.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'perl-install/diskdrake/removable.pm') diff --git a/perl-install/diskdrake/removable.pm b/perl-install/diskdrake/removable.pm index 6862225c5..75055a7f0 100644 --- a/perl-install/diskdrake/removable.pm +++ b/perl-install/diskdrake/removable.pm @@ -11,11 +11,15 @@ sub main { my ($in, $all_hds, $raw_hd) = @_; my %actions = my @actions = actions(); my $action; - while ($action ne 'Done') { - $action = $in->ask_from_list_('', - diskdrake::interactive::format_raw_hd_info($raw_hd), - [ map { $_->[0] } group_by2 @actions ], 'Done') or return; - $actions{$action}->($in, $raw_hd, $all_hds); + if ($::auto) { + $actions{Done}->($in, $raw_hd, $all_hds); + } else { + while ($action ne 'Done') { + $action = $in->ask_from_list_('', + diskdrake::interactive::format_raw_hd_info($raw_hd), + [ map { $_->[0] } group_by2 @actions ], 'Done') or return; + $actions{$action}->($in, $raw_hd, $all_hds); + } } } -- cgit v1.2.1