diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-04-08 07:53:40 -0400 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-04-09 06:21:09 -0400 |
commit | d92876fa3cecab53b46a513e22d9a9fc9fb6be02 (patch) | |
tree | 68e112614aba355bfd7ac3b2cab425f8d9b2918e /perl-install/bootloader.pm | |
parent | 32c13f240d965a60c15ad70152b5930faa3caee8 (diff) | |
download | drakx-d92876fa3cecab53b46a513e22d9a9fc9fb6be02.tar drakx-d92876fa3cecab53b46a513e22d9a9fc9fb6be02.tar.gz drakx-d92876fa3cecab53b46a513e22d9a9fc9fb6be02.tar.bz2 drakx-d92876fa3cecab53b46a513e22d9a9fc9fb6be02.tar.xz drakx-d92876fa3cecab53b46a513e22d9a9fc9fb6be02.zip |
grub2: read boot device from install.sh
instead of from deprecated drakboot.conf
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 0c6b317ad..a64b5dc59 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -292,6 +292,9 @@ Read back GRUB2 config + C</boot/grub2/drakboot.conf> sub read_grub2() { my %bootloader = getVarsFromSh("$::prefix/boot/grub2/drakboot.conf"); + if (is_empty_hash_ref(\%bootloader)) { + %bootloader = read_grub2_install_sh(); + } my %h = getVarsFromSh("$::prefix/etc/default/grub"); $bootloader{timeout} = $h{GRUB_TIMEOUT}; $bootloader{entries} = []; @@ -323,6 +326,15 @@ sub read_grub2() { \%bootloader; } +sub read_grub2_install_sh() { + my $s = cat_("$::prefix/boot/grub2/install.sh"); + my %h; + if ($s =~ m!(/dev/\S+)!m) { + $h{boot} = $1; + } + %h; +} + =item read_grub($fstab) Reads back Grub Legacy config. |