From d57092d82ad6401cc38e74e007f1e8dd86efd8f9 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 6 Jun 2005 04:37:01 +0000 Subject: keep read-only, read-write and label as verbatim as possible (note that read-only will not appear by default anymore since "ro" is the default) --- perl-install/bootloader.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'perl-install') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 853464941..729ed2712 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -310,7 +310,7 @@ sub read_lilo() { if (arch() =~ /ppc/ && $_ eq 'initrd') { $v = yaboot2file($v); } - $e->{$_} = $v || 1 if !member($_, 'read-only'); + $e->{$_} = $v || 1; } } } @@ -981,7 +981,7 @@ sub write_yaboot { #- xfs module on PPC requires larger initrd - say 6MB? push @entry_conf, "initrd-size=6144" if $bootloader->{xfsroot}; push @entry_conf, qq(append=" $entry->{append}") if $entry->{append}; - push @entry_conf, $entry->{'read-write'} ? "read-write" : "read-only"; + push @entry_conf, grep { $entry->{$_} } qw(read-write read-only); push @conf, map { "\t$_" } @entry_conf; } else { my $of_dev = dev2yaboot($entry->{kernel_or_dev}); @@ -1088,15 +1088,14 @@ sub write_lilo { foreach my $entry (@{$bootloader->{entries}}) { push @conf, "$entry->{type}=" . $file2fullname->($entry->{kernel_or_dev}); my @entry_conf; - push @entry_conf, "label=" . make_label_lilo_compatible($entry->{label}); + push @entry_conf, "label=" . make_label_lilo_compatible($entry->{label}) if $entry->{label}; if ($entry->{type} eq "image") { push @entry_conf, "root=$entry->{root}" if $entry->{root}; push @entry_conf, "initrd=" . $file2fullname->($entry->{initrd}) if $entry->{initrd}; push @entry_conf, qq(append="$entry->{append}") if $entry->{append}; push @entry_conf, "vga=$entry->{vga}" if $entry->{vga}; - push @entry_conf, $entry->{'read-write'} ? "read-write" : "read-only"; - push @entry_conf, grep { $entry->{$_} } qw(optional); + push @entry_conf, grep { $entry->{$_} } qw(read-write read-only optional); } else { delete $entry->{unsafe} if $entry->{table}; #- we can't have both push @entry_conf, map { "$_=$entry->{$_}" } grep { $entry->{$_} } qw(table boot-as); -- cgit v1.2.1