Bugzilla – Attachment 496911 Details for
Bug 769350
grub2.cfg missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
Patch to check grub.cfg existence before open and read it ..
bnc_769350.patch (text/plain), 1.60 KB, created by
Michael Chang
on 2012-06-29 11:06:15 UTC
(
hide
)
Description:
Patch to check grub.cfg existence before open and read it ..
Filename:
MIME Type:
Creator:
Michael Chang
Created:
2012-06-29 11:06:15 UTC
Size:
1.60 KB
patch
obsolete
>Index: perl-Bootloader-0.6.4/src/Core/GRUB2.pm >=================================================================== >--- perl-Bootloader-0.6.4.orig/src/Core/GRUB2.pm >+++ perl-Bootloader-0.6.4/src/Core/GRUB2.pm >@@ -468,11 +468,14 @@ sub ParseLines { > } > } > >- my @confs = @{$files{Bootloader::Path::Grub2_conf()} || []}; > my @entries = (); >- foreach my $conf (@confs) { >- if ($conf =~ /^menuentry\s+['"](.*)['"]\s+/) { >- push @entries, { "menuentry" => $1 }; >+ my $conf_path = Bootloader::Path::Grub2_conf(); >+ if (-e $conf_path) { >+ my @confs = @{$files{$conf_path} || []}; >+ foreach my $conf (@confs) { >+ if ($conf =~ /^menuentry\s+['"](.*)['"]\s+/) { >+ push @entries, { "menuentry" => $1 }; >+ } > } > } > >Index: perl-Bootloader-0.6.4/src/Core/GRUB2EFI.pm >=================================================================== >--- perl-Bootloader-0.6.4.orig/src/Core/GRUB2EFI.pm >+++ perl-Bootloader-0.6.4/src/Core/GRUB2EFI.pm >@@ -131,11 +131,14 @@ sub ParseLines { > \@defaultconf > ); > >- my @confs = @{$files{Bootloader::Path::Grub2_eficonf()} || []}; > my @entries = (); >- foreach my $conf (@confs) { >- if ($conf =~ /^menuentry\s+['"](.*)['"]\s+/) { >- push @entries, { "menuentry" => $1 }; >+ my $conf_path = Bootloader::Path::Grub2_eficonf(); >+ if (-e $conf_path) { >+ my @confs = @{$files{$conf_path} || []}; >+ foreach my $conf (@confs) { >+ if ($conf =~ /^menuentry\s+['"](.*)['"]\s+/) { >+ push @entries, { "menuentry" => $1 }; >+ } > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 769350
:
496874
| 496911 |
496950