Mageia Bugzilla – Attachment 6408 Details for
Bug 9627
MCC -> Boot -> Set up boot system -> Modify does not effect Grub2 entries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
do not run update-grub2 twice (2/2)
0002-do-not-run-update-grub2-twice.patch (text/plain), 1.51 KB, created by
Thierry Vignaud
on 2015-05-01 11:49:16 CEST
(
hide
)
Description:
do not run update-grub2 twice (2/2)
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2015-05-01 11:49:16 CEST
Size:
1.51 KB
patch
obsolete
>From e534d9413e0428f08ba53acbb9236dfea2b4f90b Mon Sep 17 00:00:00 2001 >From: Thierry Vignaud <thierry.vignaud@gmail.com> >Date: Fri, 1 May 2015 11:44:31 +0200 >Subject: [PATCH 2/2] do not run update-grub2 twice > >needed after previous commit >--- > perl-install/any.pm | 1 + > perl-install/bootloader.pm | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) > >diff --git a/perl-install/any.pm b/perl-install/any.pm >index ad070f9..441677a 100644 >--- a/perl-install/any.pm >+++ b/perl-install/any.pm >@@ -613,6 +613,7 @@ sub setupBootloader__grub2 { > # update entries (so that we can display their list below): > my $error; > run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error"; >+ local $b->{grub2_already_updated} = 1; > # read grub2 auto-generated entries (instead of keeping eg: grub/lilo ones): > my $b2 = bootloader::read_grub2(); > local $b->{entries} = $b2->{entries}; >diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm >index e8d7d19..93d7644 100644 >--- a/perl-install/bootloader.pm >+++ b/perl-install/bootloader.pm >@@ -1796,7 +1796,9 @@ sub write_grub2 { > $conf{GRUB_TIMEOUT} = $bootloader->{timeout}; > setVarsInSh($f, \%conf); > >- run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error"; >+ if (!$bootloader->{grub2_already_updated}) { >+ run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error"; >+ } > > # set default entry: > eval { >-- >2.3.2 >
From e534d9413e0428f08ba53acbb9236dfea2b4f90b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud <thierry.vignaud@gmail.com> Date: Fri, 1 May 2015 11:44:31 +0200 Subject: [PATCH 2/2] do not run update-grub2 twice needed after previous commit --- perl-install/any.pm | 1 + perl-install/bootloader.pm | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-install/any.pm b/perl-install/any.pm index ad070f9..441677a 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -613,6 +613,7 @@ sub setupBootloader__grub2 { # update entries (so that we can display their list below): my $error; run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error"; + local $b->{grub2_already_updated} = 1; # read grub2 auto-generated entries (instead of keeping eg: grub/lilo ones): my $b2 = bootloader::read_grub2(); local $b->{entries} = $b2->{entries}; diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index e8d7d19..93d7644 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1796,7 +1796,9 @@ sub write_grub2 { $conf{GRUB_TIMEOUT} = $bootloader->{timeout}; setVarsInSh($f, \%conf); - run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error"; + if (!$bootloader->{grub2_already_updated}) { + run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error"; + } # set default entry: eval { -- 2.3.2
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 9627
:
4188
|
6407
|
6408
|
6409
|
6410
|
6411
|
6418
|
6420