summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-02-04 15:07:36 +0000
committerThierry Vignaud <tv@mandriva.org>2010-02-04 15:07:36 +0000
commitbefd6e9dc1cfe837f8b9f1956ed6a9bd0a92aaf5 (patch)
tree7d433829a8e6c1ddbcd8639a1edbf98e9be2b5a1 /perl-install/bootloader.pm
parent2852057f5500444f6880edd92f05a343d2d6a531 (diff)
downloaddrakx-befd6e9dc1cfe837f8b9f1956ed6a9bd0a92aaf5.tar
drakx-befd6e9dc1cfe837f8b9f1956ed6a9bd0a92aaf5.tar.gz
drakx-befd6e9dc1cfe837f8b9f1956ed6a9bd0a92aaf5.tar.bz2
drakx-befd6e9dc1cfe837f8b9f1956ed6a9bd0a92aaf5.tar.xz
drakx-befd6e9dc1cfe837f8b9f1956ed6a9bd0a92aaf5.zip
(setupBootloader__general, read_grub_menu_lst, write_grub) default to
always crypt grub passwords
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm11
1 files changed, 3 insertions, 8 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index d56088216..5b2ac248c 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -338,7 +338,6 @@ sub read_grub_menu_lst {
}
if ($b{password} =~ /^--md5 (.*)/) {
$b{password} = $1;
- $b{encrypted} = 1;
}
#- sanitize
@@ -1747,13 +1746,9 @@ sub write_grub {
push @conf, $format->(grep { defined $bootloader->{$_} } qw(timeout));
push @conf, $format->(grep { $bootloader->{$_} } qw(color serial shade terminal viewport background foreground));
if (my $pw = $bootloader->{password}) {
- if ($bootloader->{encrypted}) {
- $pw = crypt_grub_password($pw) if !is_already_crypted($pw);
- $bootloader->{'password --md5'} = $pw;
- push @conf, $format->('password --md5');
- } else {
- push @conf, $format->('password');
- }
+ $pw = crypt_grub_password($pw) if !is_already_crypted($pw);
+ $bootloader->{'password --md5'} = $pw;
+ push @conf, $format->('password --md5');
}
push @conf, map { $_ . ' ' . $file2grub->($bootloader->{$_}) } grep { $bootloader->{$_} } qw(gfxmenu);