diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-02-27 06:40:05 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-02-27 06:40:05 +0000 |
commit | bdf52b0e98b2e5ddd24e0fc778f10a433d69377b (patch) | |
tree | 7ca12a5ed008a748ac8e7e2710aed68f0ad86a13 /perl-install | |
parent | 428f0541d73eb55125d5436e3e4184d1079c6562 (diff) | |
download | drakx-backup-do-not-use-bdf52b0e98b2e5ddd24e0fc778f10a433d69377b.tar drakx-backup-do-not-use-bdf52b0e98b2e5ddd24e0fc778f10a433d69377b.tar.gz drakx-backup-do-not-use-bdf52b0e98b2e5ddd24e0fc778f10a433d69377b.tar.bz2 drakx-backup-do-not-use-bdf52b0e98b2e5ddd24e0fc778f10a433d69377b.tar.xz drakx-backup-do-not-use-bdf52b0e98b2e5ddd24e0fc778f10a433d69377b.zip |
(read_grub2) read more of grub2 config
(needed for next commit)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 15 | ||||
-rw-r--r-- | perl-install/install/NEWS | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 7f1d540cb..321c85543 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,5 +1,6 @@ - drakboot: o fix detecting grub2 if there's a remaining grub-legacy signature + o read more of grub2 config Version 15.21 - 26 February 2013 diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index ccea86a63..f7d13ac5c 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -235,7 +235,20 @@ sub read { sub read_grub2 { my %bootloader = getVarsFromSh("$::prefix/boot/grub2/drakboot.conf"); - $bootloader{entries} = [ map { if_(/menuentry\s+['"]([^']+)["']/, { label => $1 }) } cat_("$::prefix/boot/grub2/grub.cfg") ]; + $bootloader{entries} = []; + my $entry; + foreach (cat_("$::prefix/boot/grub2/grub.cfg")) { + next if /^#/; + if (/menuentry\s+['"]([^']+)["']/) { + push @{$bootloader{entries}}, $entry if $entry; + $entry = { label => $1 }; + } elsif (/linux\s+(\S+)\s+(.*)?/) { + @$entry{qw(kernel_or_dev append)} = ($1, $2); + } elsif (/initrd\s+(\S+)/) { + $entry->{initrd} = $1; + } + } + $bootloader{method} = 'grub2'; \%bootloader; } diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index f2fdd7c8e..1f5055a68 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,5 +1,6 @@ - bootloader: o fix detecting grub2 if there's a remaining grub-legacy signature + o read more of grub2 config - do not attempt to use gurpmi.addmedia or gurpmi if in text mode Version 15.22 - 26 February 2013 |