summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-06-25 05:31:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-06-25 05:31:52 +0000
commitce17d3a6903a20969719dcab8fbb7b22ccd2d8e6 (patch)
tree3d8430d1e09ac9f382a5b12b30e50f532a2385cb
parent103ec880cbbcbc2d36131319fa22edbfe6d54069 (diff)
downloaddrakx-ce17d3a6903a20969719dcab8fbb7b22ccd2d8e6.tar
drakx-ce17d3a6903a20969719dcab8fbb7b22ccd2d8e6.tar.gz
drakx-ce17d3a6903a20969719dcab8fbb7b22ccd2d8e6.tar.bz2
drakx-ce17d3a6903a20969719dcab8fbb7b22ccd2d8e6.tar.xz
drakx-ce17d3a6903a20969719dcab8fbb7b22ccd2d8e6.zip
adapt to new bootloader.pm
-rw-r--r--perl-install/Xconfig/various.pm2
-rw-r--r--perl-install/any.pm12
-rw-r--r--perl-install/install_steps.pm4
-rwxr-xr-xperl-install/standalone/drakboot6
4 files changed, 12 insertions, 12 deletions
diff --git a/perl-install/Xconfig/various.pm b/perl-install/Xconfig/various.pm
index d3d49ee08..e69d40549 100644
--- a/perl-install/Xconfig/various.pm
+++ b/perl-install/Xconfig/various.pm
@@ -137,7 +137,7 @@ sub configure_FB_TVOUT {
if (my $tvout = bootloader::duplicate_kernel_entry($bootloader, 'TVout')) {
$tvout->{append} .= " XFree=tvout";
- bootloader::install($bootloader, [ fsedit::get_all_fstab($all_hds) ], $all_hds->{hds});
+ bootloader::install($bootloader, $all_hds->{hds});
}
}
}
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 2683a6981..ca5fdc370 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -99,7 +99,7 @@ sub setupBootloader {
eval { run_program::rooted($::prefix, 'lilo', '-u') } if $::isInstall && !$::o->{isUpgrade} && -e "$::prefix/etc/lilo.conf" && glob("$::prefix/boot/boot.*");
- bootloader::install($b, $fstab, $hds);
+ bootloader::install($b, $hds);
}
@@ -183,7 +183,7 @@ sub setupBootloader__mbr_or_not {
sub setupBootloader__general {
my ($in, $b, $all_hds, $fstab, $security) = @_;
- ($b->{method}, my $method_choices) = bootloader::method_choices($fstab, $b);
+ my @method_choices = bootloader::method_choices($fstab);
my $profiles = bootloader::has_profiles($b);
my $prev_force_acpi = my $force_acpi = bootloader::get_append($b, 'acpi') !~ /off|ht/;
my $prev_force_noapic = my $force_noapic = bootloader::get_append($b, 'noapic');
@@ -207,7 +207,7 @@ sub setupBootloader__general {
},
},
}, [
- { label => N("Bootloader to use"), val => \$b->{method}, list => [ keys %$method_choices ], format => sub { $method_choices->{$_[0]} } },
+ { label => N("Bootloader to use"), val => \$b->{method}, list => \@method_choices, format => \&bootloader::method2text },
if_(arch() !~ /ia64/,
{ label => N("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } (@{$all_hds->{hds}}, grep { !isFat_or_NTFS($_) } @$fstab)), detect_devices::floppies_dev() ], not_edit => !$::expert },
),
@@ -233,7 +233,7 @@ sub setupBootloader__general {
$in->ask_from_({ messages => N("Bootloader main options"),
interactive_help_id => 'setupYabootGeneral',
}, [
- { label => N("Bootloader to use"), val => \$b->{method}, list => [ keys %$method_choices ], format => sub { $method_choices->{$_[0]} } },
+ { label => N("Bootloader to use"), val => \$b->{method}, list => \@method_choices, format => \&bootloader::method2text },
{ label => N("Init Message"), val => \$b->{'init-message'} },
{ label => N("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } (grep { isAppleBootstrap($_) } @$fstab)) ], not_edit => !$::expert },
{ label => N("Open Firmware Delay"), val => \$b->{delay} },
@@ -286,13 +286,13 @@ sub setupBootloader__entries {
my @l;
if ($e->{type} eq "image") {
@l = (
-{ label => N("Image"), val => \$e->{kernel_or_dev}, list => [ map { s/$::prefix//; $_ } glob_("$::prefix/boot/vmlinuz*") ], not_edit => 0 },
+{ label => N("Image"), val => \$e->{kernel_or_dev}, list => [ map { "/boot/$_" } bootloader::installed_vmlinuz() ], not_edit => 0 },
{ label => N("Root"), val => \$e->{root}, list => [ map { "/dev/$_->{device}" } @$fstab ], not_edit => !$::expert },
{ label => N("Append"), val => \$e->{append} },
if_(arch() !~ /ppc|ia64/,
{ label => N("Video mode"), val => \$vga, list => [ '', Xconfig::resolution_and_depth::bios_vga_modes() ], format => \&Xconfig::resolution_and_depth::to_string, advanced => 1 },
),
-{ label => N("Initrd"), val => \$e->{initrd}, list => [ map { s/$::prefix//; $_ } glob_("$::prefix/boot/initrd*") ], not_edit => 0, advanced => 1 },
+{ label => N("Initrd"), val => \$e->{initrd}, list => [ map { if_(/^initrd/, "/boot/$_") } all("$::prefix/boot") ], not_edit => 0, advanced => 1 },
);
} else {
@l = (
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 828aa7d12..f827aa79e 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -839,7 +839,7 @@ sub setupBootloaderBefore {
my $p = pkgs::packageByName($o->{packages}, 'bootsplash');
$p && $p->flag_installed;
};
- bootloader::suggest($o->{bootloader}, $o->{all_hds}{hds}, $o->{fstab},
+ bootloader::suggest($o->{bootloader}, $o->{all_hds}{hds},
vga_fb => ($force_vga || $vga && $need_fb) && $o->{vga},
quiet => $o->{meta_class} ne 'server');
bootloader::suggest_floppy($o->{bootloader}) if $o->{security} <= 3 && arch() !~ /ppc/;
@@ -851,7 +851,7 @@ sub setupBootloader {
my ($o) = @_;
require bootloader;
- bootloader::install($o->{bootloader}, $o->{fstab}, $o->{all_hds}{hds});
+ bootloader::install($o->{bootloader}, $o->{all_hds}{hds});
}
#------------------------------------------------------------------------------
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index 21622e21f..7671271a7 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -236,13 +236,13 @@ $in->exit(0);
sub lilo_choice() {
- my $bootloader = bootloader::read();
-
my $all_hds = fsedit::get_hds();
fs::get_raw_hds('', $all_hds);
fs::get_info_from_fstab($all_hds, '');
my $fstab = [ fsedit::get_all_fstab($all_hds) ];
+ my $bootloader = bootloader::read($fstab);
+
ask:
eval {
my $before = fs::fstab_to_string($all_hds);
@@ -257,7 +257,7 @@ sub lilo_choice() {
# BUG: note that the following message won't speak about the right bootloader if user is currently switching between
# various bootloaders and if the error occured before boot sector get overwritten by bootloader installer
$in->ask_warn(N("Error"),
- [ N("Installation of %s failed. The following error occured:", bootloader::detect_bootloader()), $err ]);
+ [ N("Installation of %s failed. The following error occured:", $bootloader->{method}), $err ]);
goto ask;
}
}