Mageia Bugzilla – Attachment 7628 Details for
Bug 18112
Unable to enter boot password after update of memtest86
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
a better fix
18112b.diff (text/plain), 1.04 KB, created by
Thierry Vignaud
on 2016-04-05 00:04:07 CEST
(
hide
)
Description:
a better fix
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2016-04-05 00:04:07 CEST
Size:
1.04 KB
patch
obsolete
>diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm >index 6ffca62..d8631f9 100644 >--- a/perl-install/bootloader.pm >+++ b/perl-install/bootloader.pm >@@ -1804,15 +1804,18 @@ sub write_grub2 { > my $error; > > my $f = "$::prefix/etc/default/grub"; >+ my $f1 = "$::prefix/boot/grub2/grub.cfg"; > my %conf = getVarsFromSh($f); >- $conf{GRUB_CMDLINE_LINUX_DEFAULT} = get_grub2_append($bootloader); >+ # first installation? >+ if (-e !$f1) { >+ $conf{GRUB_CMDLINE_LINUX_DEFAULT} = get_grub2_append($bootloader); >+ } > $conf{GRUB_GFXPAYLOAD_LINUX} = 'auto' if is_uefi(); > $conf{GRUB_DISABLE_RECOVERY} = 'false'; # for 'failsafe' entry > $conf{GRUB_TIMEOUT} = $bootloader->{timeout}; > renamef($f, $f . ($o_backup_extension || '.old')); > setVarsInSh($f, \%conf); > >- my $f1 = "$::prefix/boot/grub2/grub.cfg"; > renamef($f1, $f1 . ($o_backup_extension || '.old')); > run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error"; > log::l("update-grub2 logs: $error");
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 6ffca62..d8631f9 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1804,15 +1804,18 @@ sub write_grub2 { my $error; my $f = "$::prefix/etc/default/grub"; + my $f1 = "$::prefix/boot/grub2/grub.cfg"; my %conf = getVarsFromSh($f); - $conf{GRUB_CMDLINE_LINUX_DEFAULT} = get_grub2_append($bootloader); + # first installation? + if (-e !$f1) { + $conf{GRUB_CMDLINE_LINUX_DEFAULT} = get_grub2_append($bootloader); + } $conf{GRUB_GFXPAYLOAD_LINUX} = 'auto' if is_uefi(); $conf{GRUB_DISABLE_RECOVERY} = 'false'; # for 'failsafe' entry $conf{GRUB_TIMEOUT} = $bootloader->{timeout}; renamef($f, $f . ($o_backup_extension || '.old')); setVarsInSh($f, \%conf); - my $f1 = "$::prefix/boot/grub2/grub.cfg"; renamef($f1, $f1 . ($o_backup_extension || '.old')); run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error"; log::l("update-grub2 logs: $error");
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18112
:
7626
|
7627
|
7628
|
7629