summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-04-23 11:56:25 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-04-23 11:56:25 +0000
commit507bd7737a20d91e21d6d2b833b2344d94960a73 (patch)
tree19847b326ea6643d9b8ec469549b89ca7344a197
parent46d8330d8bd84e1016b2f72306e2591ac9d73389 (diff)
downloaddrakx-507bd7737a20d91e21d6d2b833b2344d94960a73.tar
drakx-507bd7737a20d91e21d6d2b833b2344d94960a73.tar.gz
drakx-507bd7737a20d91e21d6d2b833b2344d94960a73.tar.bz2
drakx-507bd7737a20d91e21d6d2b833b2344d94960a73.tar.xz
drakx-507bd7737a20d91e21d6d2b833b2344d94960a73.zip
handle --auto when managing removable media
-rw-r--r--perl-install/diskdrake/interactive.pm2
-rw-r--r--perl-install/diskdrake/removable.pm14
2 files changed, 10 insertions, 6 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index a037c4fe4..dbb44961d 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} && $in->ask_yesorno('', N("Do you want to save /etc/fstab modifications"), 1)) {
+ if ($new ne $all_hds->{current_fstab} && ($::auto || $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 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);
+ }
}
}