From 5a0dfe7fa86b8d86f7a035f79f8072bd6ad0a7d6 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sun, 29 Dec 2002 13:19:29 +0000 Subject: cleanup (using ask_from instead of ask_from_listf_) --- perl-install/any.pm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'perl-install/any.pm') diff --git a/perl-install/any.pm b/perl-install/any.pm index a7a57b5a0..d8b0804b9 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -108,11 +108,9 @@ sub setupBootloader { $in->set_help('setupBootloaderBeginner') unless $::isStandalone; if (arch() =~ /sparc/) { - $b->{use_partition} = $in->ask_from_listf_(N("SILO Installation"), - N("Where do you want to install the bootloader?"), - sub { $l[$_[0]] }, - [ 0, 1 ], $b->{use_partition}); - defined $b->{use_partition} or return 0 + $in->ask_from(N("SILO Installation"), + N("Where do you want to install the bootloader?"), + { val => \$b->{use_partition}, list => [ 0, 1 ], format => sub { translate($l[$_[0]]) } }) or return 0; } elsif (arch() =~ /ppc/) { if (defined $partition_table::mac::bootstrap_part) { $b->{boot} = $partition_table::mac::bootstrap_part; @@ -122,11 +120,11 @@ sub setupBootloader { } } else { my $boot = $hds->[0]{device}; - my $onmbr = "/dev/$boot" eq $b->{boot}; - $b->{boot} = "/dev/" . ($in->ask_from_list_(N("LILO/grub Installation"), - N("Where do you want to install the bootloader?"), - \@l, $l[!$onmbr]) eq $l[0] ? - $boot : fsedit::get_root($fstab, 'boot')->{device}); + my $use_partition = "/dev/$boot" ne $b->{boot}; + $in->ask_from(N("LILO/grub Installation"), + N("Where do you want to install the bootloader?"), + { val => \$use_partition, list => [ 0, 1 ], format => sub { translate($l[$_[0]]) } }); + $b->{boot} = "/dev/" . ($use_partition ? fsedit::get_root($fstab, 'boot')->{device} : $boot); } } else { $in->set_help(arch() =~ /sparc/ ? "setupSILOGeneral" : arch() =~ /ppc/ ? 'setupYabootGeneral' : "setupBootloader") unless $::isStandalone; #- TO MERGE ? -- cgit v1.2.1