From 57fca3088390e3f61ebafb46aff0e3f865a97060 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 27 Apr 2004 09:59:36 +0000 Subject: revert handling --auto for removable, it is much better done in a separate function (the goal of this --auto is not clear at all, and is better explicitly done) --- perl-install/diskdrake/interactive.pm | 2 +- perl-install/diskdrake/removable.pm | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'perl-install/diskdrake') diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index dbb44961d..a037c4fe4 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -267,7 +267,7 @@ sub Done { } if (!$::isInstall) { my $new = fs::fstab_to_string($all_hds); - if ($new ne $all_hds->{current_fstab} && ($::auto || $in->ask_yesorno('', N("Do you want to save /etc/fstab modifications"), 1))) { + if ($new ne $all_hds->{current_fstab} && $in->ask_yesorno('', N("Do you want to save /etc/fstab modifications"), 1)) { $all_hds->{current_fstab} = $new; fs::write_fstab($all_hds); } diff --git a/perl-install/diskdrake/removable.pm b/perl-install/diskdrake/removable.pm index 75055a7f0..6862225c5 100644 --- a/perl-install/diskdrake/removable.pm +++ b/perl-install/diskdrake/removable.pm @@ -11,15 +11,11 @@ sub main { my ($in, $all_hds, $raw_hd) = @_; my %actions = my @actions = actions(); my $action; - 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); - } + 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