summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-21 15:44:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-21 15:44:10 +0000
commitf6e56241761735ab6129bcd2ace8496250266c60 (patch)
treedf6008711d08aed5bf4402323d35d3c4f75e13c9
parent5e87f40090eceb7aff9cf28b81a438c039b8df55 (diff)
downloaddrakx-backup-do-not-use-f6e56241761735ab6129bcd2ace8496250266c60.tar
drakx-backup-do-not-use-f6e56241761735ab6129bcd2ace8496250266c60.tar.gz
drakx-backup-do-not-use-f6e56241761735ab6129bcd2ace8496250266c60.tar.bz2
drakx-backup-do-not-use-f6e56241761735ab6129bcd2ace8496250266c60.tar.xz
drakx-backup-do-not-use-f6e56241761735ab6129bcd2ace8496250266c60.zip
enhance yaboot macos entry handling (mostly written by cjw) (bugzilla #14642)
-rw-r--r--perl-install/bootloader.pm21
1 files changed, 15 insertions, 6 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 6049b7ee0..b1f2ef632 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -254,13 +254,22 @@ sub read_grub {
\%b;
}
+sub yaboot2dev {
+ my ($of_path) = @_;
+ find { dev2yaboot($_) eq $of_path } map { "/dev/$_->{dev}" } devices::read_proc_partitions_raw();
+}
+
# assumes file is in /boot
+# to do: use yaboot2dev for files as well
+#- example of of_path: /pci@f4000000/ata-6@d/disk@0:3,/initrd-2.6.8.1-8mdk.img
sub yaboot2file {
my ($of_path) = @_;
-
- #- example of of_path: /pci@f4000000/ata-6@d/disk@0:3,/initrd-2.6.8.1-8mdk.img
-
- "$::prefix/boot/" . basename($of_path);
+
+ if ($of_path =~ /,/) {
+ "$::prefix/boot/" . basename($of_path);
+ } else {
+ yaboot2dev($of_path);
+ }
}
sub read_cromwell() {
@@ -784,7 +793,7 @@ wait for default boot.
if (defined $partition_table::mac::macos_part) {
add_entry($bootloader,
{
- label => "macos",
+ type => "macos",
kernel_or_dev => $partition_table::mac::macos_part
});
}
@@ -959,7 +968,7 @@ sub write_yaboot {
push @conf, map { "\t$_" } @entry_conf;
} else {
my $of_dev = dev2yaboot($entry->{kernel_or_dev});
- push @conf, "$entry->{label}=$of_dev";
+ push @conf, "$entry->{type}=$of_dev";
}
}
my $f = "$::prefix/etc/yaboot.conf";