summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
committerMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
commitd5c526273db473a7d87a26000585900fc10dda7d (patch)
tree0fdaabe7a00921b6cc556601b103d344fc7ac781 /perl-install/bootloader.pm
parent9c164312d4bfff6d93e1c4529de6b992f2bebc44 (diff)
downloaddrakx-d5c526273db473a7d87a26000585900fc10dda7d.tar
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.gz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.bz2
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.xz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.zip
This commit was manufactured by cvs2svn to create branch
'unlabeled-1.1.1'.
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm30
1 files changed, 2 insertions, 28 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index f3fe2cd59..11f9d2ae3 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -113,15 +113,6 @@ sub suggest_onmbr($) {
!$type || member($type, qw(dos dummy lilo grub empty)), !$type;
}
-sub compare_entries($$) {
- my ($a, $b) = @_;
- my %entries;
-
- @entries{keys %$a, keys %$b} = ();
- $a->{$_} eq $b->{$_} and delete $entries{$_} foreach keys %entries;
- scalar keys %entries;
-}
-
sub add_entry($$) {
my ($entries, $v) = @_;
my (%usedold, $freeold);
@@ -129,18 +120,13 @@ sub add_entry($$) {
do { $usedold{$1 || 0} = 1 if $_->{label} =~ /^old ([^_]*)_/x } foreach @$entries;
foreach (0..scalar keys %usedold) { exists $usedold{$_} or $freeold = $_ || '', last }
- foreach (@$entries) {
- if ($_->{label} eq $v->{label}) {
- compare_entries($_, $v) or return; #- avoid inserting it twice as another entry already exists !
- $_->{label} = "old${freeold}_$_->{label}";
- }
- }
+ do { $_->{label} = "old${freeold}_$_->{label}" if $_->{label} eq $v->{label} } foreach @$entries;
push @$entries, $v;
}
sub add_kernel($$$$$) {
my ($prefix, $lilo, $kernelVersion, $specific, $v) = @_;
- my $ext = $specific && "-$specific"; $specific eq 'hack' and $specific = '';
+ my $ext = $specific && "-$specific";
my ($vmlinuz, $image, $initrdImage) = ("vmlinuz-$kernelVersion$specific", "/boot/vmlinuz$ext", "/boot/initrd$ext.img");
-e "$prefix/boot/$vmlinuz" or log::l("unable to find kernel image $prefix/boot/$vmlinuz"), return;
{
@@ -194,7 +180,6 @@ sub suggest($$$$$) {
my $root_part = fsedit::get_root($fstab);
my $root = isLoopback($root_part) ? "loop7" : $root_part->{device};
my $boot = fsedit::get_root($fstab, 'boot')->{device};
- my $partition = first($boot =~ /\D*(\d*)/);
require c; c::initSilo() if arch() =~ /sparc/;
@@ -264,17 +249,6 @@ wait %d seconds for default boot.
root => "/dev/$root",
})->{append} .= " failsafe" unless $lilo->{password};
- #- manage hackkernel if installed.
- my $hasHack = -e "$prefix/boot/vmlinuz-hack";
- if ($hasHack) {
- my $hackVersion = first(readlink("$prefix/boot/vmlinuz-hack") =~ /vmlinuz-(.*)/);
- add_kernel($prefix, $lilo, $hackVersion, 'hack',
- {
- label => 'hack',
- root => "/dev/$root",
- }) if $hackVersion;
- }
-
if (arch() =~ /sparc/) {
#- search for SunOS, it could be a really better approach to take into account
#- partition type for mounting point.