diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-06-06 04:37:01 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-06-06 04:37:01 +0000 |
commit | d57092d82ad6401cc38e74e007f1e8dd86efd8f9 (patch) | |
tree | 06385ea674a52d52bc1f64ab9e4bcf4443a9404f | |
parent | ed34aa9a2966e41a694f5129882de512e4a16792 (diff) | |
download | drakx-backup-do-not-use-d57092d82ad6401cc38e74e007f1e8dd86efd8f9.tar drakx-backup-do-not-use-d57092d82ad6401cc38e74e007f1e8dd86efd8f9.tar.gz drakx-backup-do-not-use-d57092d82ad6401cc38e74e007f1e8dd86efd8f9.tar.bz2 drakx-backup-do-not-use-d57092d82ad6401cc38e74e007f1e8dd86efd8f9.tar.xz drakx-backup-do-not-use-d57092d82ad6401cc38e74e007f1e8dd86efd8f9.zip |
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)
-rw-r--r-- | perl-install/bootloader.pm | 9 |
1 files changed, 4 insertions, 5 deletions
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); |