From 7d6fa0616d52b391e80d86279064eb15f4c95101 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 3 Jul 2001 22:12:35 +0000 Subject: (doPartitionDisks): better error message when no root partition is found --- perl-install/install_steps_interactive.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index f96f4f0a3..318ebd6d0 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -356,12 +356,13 @@ Continue at your own risk!")); if ($o->{isUpgrade}) { # either one root is defined (and all is ok), or we take the first one we find - my $p = - fsedit::get_root_($o->{fstab}) || - $o->ask_from_listf(_("Root Partition"), - _("What is the root partition (/) of your system?"), - \&partition_table_raw::description, - [ install_any::find_root_parts($o->{fstab}, $o->{prefix}) ]) or die "setstep exitInstall\n"; + my $p = fsedit::get_root_($o->{fstab}); + if (!$p) { + my @l = install_any::find_root_parts($o->{fstab}, $o->{prefix}) or die _("No root partition found to perform an upgrade"); + $p = $o->ask_from_listf(_("Root Partition"), + _("What is the root partition (/) of your system?"), + \&partition_table_raw::description, \@l) or die "setstep exitInstall\n"; + } install_any::use_root_part($o->{fstab}, $p, $o->{prefix}); } elsif ($::expert && ref($o) =~ /gtk/) { install_interactive::partition_with_diskdrake($o, $o->{hds}); -- cgit v1.2.1