diff options
-rw-r--r-- | perl-install/any.pm | 4 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 10 | ||||
-rw-r--r-- | perl-install/partition_table_mac.pm | 25 |
3 files changed, 22 insertions, 17 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index eb6fe6418..769b44c4c 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -104,8 +104,8 @@ sub setupBootloader { _("Where do you want to install the bootloader?"), \@l, $l[$b->{use_partition}]) or return; } elsif (arch() =~ /ppc/) { - if (defined $partition_table_mac'bootstrap_part) { - $b->{boot} = $partition_table_mac'bootstrap_part; + if (defined $partition_table_mac::bootstrap_part) { + $b->{boot} = $partition_table_mac::bootstrap_part; log::l("set bootstrap to $b->{boot}"); } else { die "no bootstrap partition - yaboot.conf creation failed"; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 70de100ec..eb92b6014 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -323,14 +323,14 @@ _("DiskDrake failed to read correctly the partition table. Continue at your own risk!")); if (arch() =~ /ppc/ && !$::expert) { #- need to make bootstrap part if recommended install - thx Pixel ;^) - if (defined $partition_table_mac'bootstrap_part) { + if (defined $partition_table_mac::bootstrap_part) { #- don't do anything if we've got the bootstrap setup #- otherwise, go ahead and create one somewhere in the drive free space } else { - if (defined $partition_table_mac'freepart_start && $partition_table_mac'freepart_size >= 1) { - my ($hd) = $partition_table_mac'freepart_device; - log::l("creating bootstrap partition on drive /dev/$hd->{device}, block $partition_table_mac'freepart_start"); - fsedit::add($hd, { start => $partition_table_mac'freepart_start, size => 1 << 11, type => 0x401, mntpoint => '' }, $o->{hds}, { force => 1, primaryOrExtended => 'Primary' }); + if (defined $partition_table_mac::freepart_start && $partition_table_mac::freepart_size >= 1) { + my ($hd) = $partition_table_mac::freepart_device; + log::l("creating bootstrap partition on drive /dev/$hd->{device}, block $partition_table_mac::freepart_start"); + fsedit::add($hd, { start => $partition_table_mac::freepart_start, size => 1 << 11, type => 0x401, mntpoint => '' }, $o->{hds}, { force => 1, primaryOrExtended => 'Primary' }); } else { die "no free space for 1MB bootstrap"; } diff --git a/perl-install/partition_table_mac.pm b/perl-install/partition_table_mac.pm index 30c269398..800bfc285 100644 --- a/perl-install/partition_table_mac.pm +++ b/perl-install/partition_table_mac.pm @@ -138,23 +138,23 @@ sub read($$) { $h{pName} =~ /swap/i ? ($h{type} = 0x82) : ($h{type} = 0x83); } elsif ($h{pType} =~ /^Apple_Free/i) { #- need to locate a 1MB partition to setup a bootstrap on - if (defined $partition_table_mac'freepart_start && $partition_table_mac'freepart_size >= 1) { + if (defined $partition_table_mac::freepart_start && $partition_table_mac::freepart_size >= 1) { #- already found a suitable partition } else { - $partition_table_mac'freepart_start = $h{start}; - $partition_table_mac'freepart_size = $h{size}/2048; - $partition_table_mac'freepart_device = $hd; - log::l("free apple partition found on drive /dev/$partition_table_mac'freepart_device->{device}, block $partition_table_mac'freepart_start, size $partition_table_mac'freepart_size"); + $partition_table_mac::freepart_start = $h{start}; + $partition_table_mac::freepart_size = $h{size}/2048; + $partition_table_mac::freepart_device = $hd; + log::l("free apple partition found on drive /dev/$partition_table_mac::freepart_device->{device}, block $partition_table_mac::freepart_start, size $partition_table_mac::freepart_size"); } next; #$h{type} = 0x0; } elsif ($h{pType} =~ /^Apple_HFS/i) { $h{type} = 0x402; - if (defined $partition_table_mac'macos_part) { + if (defined $partition_table_mac::macos_part) { #- swag at identifying MacOS - 1st HFS partition } else { - $partition_table_mac'macos_part = "/dev/" . $hd->{device} . ($i+1); - log::l("found MacOS at partition $partition_table_mac'macos_part"); + $partition_table_mac::macos_part = "/dev/" . $hd->{device} . ($i+1); + log::l("found MacOS at partition $partition_table_mac::macos_part"); } } elsif ($h{pType} =~ /^Apple_Partition_Map/i) { $h{type} = 0x401; @@ -162,8 +162,13 @@ sub read($$) { } elsif ($h{pType} =~ /^Apple_Bootstrap/i) { $h{type} = 0x401; $h{isBoot} = 1; - $partition_table_mac'bootstrap_part = "/dev/" . $hd->{device} . ($i+1); - log::l("found bootstrap at partition $partition_table_mac'bootstrap_part"); + if (defined $partition_table_mac::bootstrap_part) { + #found a bootstrap already - use it, but log the find + log::l("found another apple bootstrap at partition /dev/$hd->{device}" . ($i+1)); + } else { + $partition_table_mac::bootstrap_part = "/dev/" . $hd->{device} . ($i+1); + log::l("found apple bootstrap at partition $partition_table_mac::bootstrap_part"); + } } else { $h{type} = 0x401; $h{isDriver} = 1; |