summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-05 06:14:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-05 06:14:59 +0000
commit754472c45d18d00d6e0d25677912a21c976c7481 (patch)
tree5fd691bebae146a1335704bc1d553613a1c77474 /perl-install
parent53612ac1c6058c05c5f63b4549ed7472b2ada42e (diff)
downloaddrakx-754472c45d18d00d6e0d25677912a21c976c7481.tar
drakx-754472c45d18d00d6e0d25677912a21c976c7481.tar.gz
drakx-754472c45d18d00d6e0d25677912a21c976c7481.tar.bz2
drakx-754472c45d18d00d6e0d25677912a21c976c7481.tar.xz
drakx-754472c45d18d00d6e0d25677912a21c976c7481.zip
update yaboot code (based on Christiaan Welvaart patch)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm26
1 files changed, 18 insertions, 8 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 84251663f..7a14693d8 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -846,6 +846,10 @@ sub check_enough_space() {
sub write_yaboot {
my ($bootloader, $_all_hds) = @_;
+
+ my $mac_type = detect_devices::get_mac_model();
+ return if $mac_type =~ /Power Macintosh/;
+
$bootloader->{prompt} ||= $bootloader->{timeout};
if ($bootloader->{message}) {
@@ -860,16 +864,21 @@ sub write_yaboot {
if ($bootloader->{boot}) {
push @conf, "boot=$bootloader->{boot}";
push @conf, "ofboot=" . get_of_dev($bootloader->{boot})
+ } elsif ($mac_type =~ /IBM/) {
+ push @conf, "boot=/dev/sda1";
} else {
die "no bootstrap partition defined."
}
- push @conf, map { "$_=$bootloader->{$_}" } grep { $bootloader->{$_} } qw(delay timeout defaultos default);
+ push @conf, map { "$_=$bootloader->{$_}" } grep { $bootloader->{$_} } (qw(delay timeout default), if_($mac_type !~ /IBM/, 'defaultos'));
push @conf, "install=/usr/lib/yaboot/yaboot";
- push @conf, "magicboot=/usr/lib/yaboot/ofboot";
- push @conf, grep { $bootloader->{$_} } qw(enablecdboot enableofboot);
- #- push @conf, "nonvram";
- my $boot = "/dev/" . $bootloader->{useboot} if $bootloader->{useboot};
+ if ($mac_type =~ /IBM/) {
+ push @conf, 'nonvram';
+ } else {
+ push @conf, 'magicboot=/usr/lib/yaboot/ofboot';
+ push @conf, grep { $bootloader->{$_} } qw(enablecdboot enableofboot);
+ }
+ my $boot = $bootloader->{useboot} && "/dev/" . $bootloader->{useboot};
foreach (@{$bootloader->{entries}}) {
@@ -914,9 +923,10 @@ sub install_yaboot {
}
sub when_config_changed_yaboot {
my ($bootloader) = @_;
- my $f = "$::prefix/tmp/of_boot_dev";
- my $of_dev = get_of_dev($bootloader->{boot});
- output($f, "$of_dev\n");
+ if ($bootloader->{boot}) {
+ my $of_dev = get_of_dev($bootloader->{boot});
+ output("$::prefix/tmp/of_boot_dev", "$of_dev\n");
+ }
$::testing and return;
if (defined $install_steps_interactive::new_bootstrap) {
run_program::run("hformat", $bootloader->{boot}) or die "hformat failed";