From b0f1bfa7e23ce289faacd38356b62600d34d2e5a Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Mon, 12 Apr 2010 12:34:45 +0000 Subject: [drakboot] add per-boot-entry lock with password checkbox --- perl-install/any.pm | 1 + perl-install/bootloader.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/perl-install/any.pm b/perl-install/any.pm index 58a537467..5e11c7aa5 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -533,6 +533,7 @@ sub setupBootloader__entries { if_($e->{xen}, { label => N("Xen append"), val => \$e->{xen_append} } ), + if_($b->{password}, { label => N("Requires password to boot"), val => \$e->{lock}, type => "bool"}), if_(arch() !~ /ppc|ia64/, { label => N("Video mode"), val => \$vga, list => [ '', Xconfig::resolution_and_depth::bios_vga_modes() ], format => \&Xconfig::resolution_and_depth::to_string, advanced => 1 }, ), diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index cb953e801..52ecdc89f 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1448,6 +1448,7 @@ sub write_lilo { push @entry_conf, "append=" . $quotes->($append) if $append; push @entry_conf, "vga=$entry->{vga}" if $entry->{vga}; push @entry_conf, grep { $entry->{$_} } qw(read-write read-only optional); + push @entry_conf, "mandatory" if $entry->{lock}; } 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