diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-02-26 06:36:01 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-02-26 06:36:01 +0000 |
commit | ad49c99bcbf96ceba99541e238b4682728fd7bb4 (patch) | |
tree | 895435b658d0ccaaf7f6ab555741b90195bd89c7 /perl-install | |
parent | 07e57fca9b7e378e22845938ccefc991d0b2939e (diff) | |
download | drakx-ad49c99bcbf96ceba99541e238b4682728fd7bb4.tar drakx-ad49c99bcbf96ceba99541e238b4682728fd7bb4.tar.gz drakx-ad49c99bcbf96ceba99541e238b4682728fd7bb4.tar.bz2 drakx-ad49c99bcbf96ceba99541e238b4682728fd7bb4.tar.xz drakx-ad49c99bcbf96ceba99541e238b4682728fd7bb4.zip |
(read_grub2) add basic support for reading back grub2 config
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index d876d8d50..e87ebcf4e 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,4 +1,5 @@ - drakboot: + o add basic support for reading back grub2 config o read & write /boot/grub2/drakboot.conf o prevent installing grub2 somewhere else than MBR - always bypass blkid cache (the cache only includes a subset of the data we need) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 9e8a7d66a..68df8acd3 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -235,6 +235,9 @@ 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{method} = 'grub2'; + \%bootloader; } sub read_grub { |