summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-06 05:15:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-06 05:15:05 +0000
commit3ebc20e3b7c3656d356b1775d6a4e176dfe1ae81 (patch)
tree086dc6489f830740f2239b694b5ceffa2057bcf0
parent639353e644f1b4afd724ef3f03896f2e641c4a83 (diff)
downloaddrakx-3ebc20e3b7c3656d356b1775d6a4e176dfe1ae81.tar
drakx-3ebc20e3b7c3656d356b1775d6a4e176dfe1ae81.tar.gz
drakx-3ebc20e3b7c3656d356b1775d6a4e176dfe1ae81.tar.bz2
drakx-3ebc20e3b7c3656d356b1775d6a4e176dfe1ae81.tar.xz
drakx-3ebc20e3b7c3656d356b1775d6a4e176dfe1ae81.zip
cleanup
-rw-r--r--perl-install/bootloader.pm25
1 files changed, 13 insertions, 12 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 9d6cbd8c3..71a7268b2 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -974,18 +974,19 @@ sub write_lilo {
foreach (@{$bootloader->{entries}}) {
push @conf, "$_->{type}=" . $file2fullname->($_->{kernel_or_dev});
- push @conf, "\tlabel=" . make_label_lilo_compatible($_->{label});
+ my @entry_conf;
+ push @entry_conf, "label=" . make_label_lilo_compatible($_->{label});
if ($_->{type} eq "image") {
- push @conf, "\troot=$_->{root}" if $_->{root};
- push @conf, "\tinitrd=" . $file2fullname->($_->{initrd}) if $_->{initrd};
- push @conf, qq(\tappend="$_->{append}") if $_->{append};
- push @conf, "\tvga=$_->{vga}" if $_->{vga};
- push @conf, "\tread-write" if $_->{'read-write'};
- push @conf, "\tread-only" if !$_->{'read-write'};
+ push @entry_conf, "root=$_->{root}" if $_->{root};
+ push @entry_conf, "initrd=" . $file2fullname->($_->{initrd}) if $_->{initrd};
+ push @entry_conf, qq(append="$_->{append}") if $_->{append};
+ push @entry_conf, "vga=$_->{vga}" if $_->{vga};
+ push @entry_conf, "read-write" if $_->{'read-write'};
+ push @entry_conf, "read-only" if !$_->{'read-write'};
} else {
- push @conf, "\ttable=$_->{table}" if $_->{table};
- push @conf, "\tunsafe" if $_->{unsafe} && !$_->{table};
+ push @entry_conf, "table=$_->{table}" if $_->{table};
+ push @entry_conf, "unsafe" if $_->{unsafe} && !$_->{table};
if ($_->{table}) {
my $hd = fs::device2part($_->{table}, $hds);
@@ -995,11 +996,11 @@ sub write_lilo {
$_->{mapdrive} ||= { '0x80' => $nb, $nb => '0x80' };
}
}
- while (my ($from, $to) = each %{$_->{mapdrive} || {}}) {
- push @conf, "\tmap-drive=$from";
- push @conf, "\t to=$to";
+ if ($_->{mapdrive}) {
+ push @entry_conf, map_each { "map-drive=$::a", " to=$::b" } %{$_->{mapdrive}};
}
}
+ push @conf, map { "\t$_" } @entry_conf;
}
my $f = arch() =~ /ia64/ ? "$::prefix/boot/efi/elilo.conf" : "$::prefix/etc/lilo.conf";