From 9eb679e92c96ca1dc4e14611a44c8a654b3c567e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 5 Apr 2005 08:02:32 +0000 Subject: apply patch from bugzilla #15216, adding support for "password=..." and "restricted" at per-entry level (thanks to jarfil) --- perl-install/bootloader.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'perl-install/bootloader.pm') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index b1f2ef632..ecdc9f2f1 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1044,6 +1044,9 @@ sub write_lilo { #- normalize: RESTRICTED is only valid if PASSWORD is set delete $bootloader->{restricted} if !$bootloader->{password}; + foreach my $entry (@{$bootloader->{entries}}) { + delete $entry->{restricted} if !$entry->{password} && !$bootloader->{password}; + } if (!get_label($bootloader->{default}, $bootloader)) { log::l("default bootloader entry $bootloader->{default} is invalid, choose another one"); @@ -1097,6 +1100,9 @@ sub write_lilo { push @entry_conf, map_each { "map-drive=$::a", " to=$::b" } %{$entry->{mapdrive}}; } } + push @entry_conf, "password=$entry->{password}" if $entry->{password}; + push @entry_conf, "restricted" if $entry->{restricted}; + push @conf, map { "\t$_" } @entry_conf; } my $f = arch() =~ /ia64/ ? "$::prefix/boot/efi/elilo.conf" : "$::prefix/etc/lilo.conf"; -- cgit v1.2.1