Mageia Bugzilla – Attachment 6409 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]
prepare for reusing code (1/3)
0001-get_grub2_append-split-it.patch (text/plain), 1.49 KB, created by
Thierry Vignaud
on 2015-05-01 12:01:04 CEST
(
hide
)
Description:
prepare for reusing code (1/3)
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2015-05-01 12:01:04 CEST
Size:
1.49 KB
patch
obsolete
>From 80ceebed6d7f1be694e41de9ab30cebf42faf68c Mon Sep 17 00:00:00 2001 >From: Thierry Vignaud <thierry.vignaud@gmail.com> >Date: Fri, 1 May 2015 11:53:47 +0200 >Subject: [PATCH 1/3] (get_grub2_append) split it > >out of write_grub2() > >needed for next commit >--- > perl-install/bootloader.pm | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > >diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm >index e8d7d19..3991739 100644 >--- a/perl-install/bootloader.pm >+++ b/perl-install/bootloader.pm >@@ -1774,10 +1774,8 @@ sub crypt_grub_password { > chomp_($res); > } > >-sub write_grub2 { >- my ($bootloader, $_all_hds, $o_backup_extension) = @_; >- my $error; >- >+sub get_grub2_append { >+ my ($bootloader) = @_; > # set default parameters: > my ($entry) = grep { $_->{kernel_or_dev} =~ /vmlin/ } @{$bootloader->{entries}}; > my $append = $entry->{append}; >@@ -1787,10 +1785,16 @@ sub write_grub2 { > $append =~ s/root=\S+//g; > $append =~ s/\bro\b//g; > $append =~ s/\s+/ /g; >+ $append; >+} >+ >+sub write_grub2 { >+ my ($bootloader, $_all_hds, $o_backup_extension) = @_; >+ my $error; > > my $f = "$::prefix/etc/default/grub"; > my %conf = getVarsFromSh($f); >- $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $append; >+ $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}; >-- >2.3.2 >
From 80ceebed6d7f1be694e41de9ab30cebf42faf68c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud <thierry.vignaud@gmail.com> Date: Fri, 1 May 2015 11:53:47 +0200 Subject: [PATCH 1/3] (get_grub2_append) split it out of write_grub2() needed for next commit --- perl-install/bootloader.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index e8d7d19..3991739 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1774,10 +1774,8 @@ sub crypt_grub_password { chomp_($res); } -sub write_grub2 { - my ($bootloader, $_all_hds, $o_backup_extension) = @_; - my $error; - +sub get_grub2_append { + my ($bootloader) = @_; # set default parameters: my ($entry) = grep { $_->{kernel_or_dev} =~ /vmlin/ } @{$bootloader->{entries}}; my $append = $entry->{append}; @@ -1787,10 +1785,16 @@ sub write_grub2 { $append =~ s/root=\S+//g; $append =~ s/\bro\b//g; $append =~ s/\s+/ /g; + $append; +} + +sub write_grub2 { + my ($bootloader, $_all_hds, $o_backup_extension) = @_; + my $error; my $f = "$::prefix/etc/default/grub"; my %conf = getVarsFromSh($f); - $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $append; + $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}; -- 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