summaryrefslogtreecommitdiffstats
path: root/lib/MGA
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2019-02-16 21:43:10 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2019-02-16 21:43:10 +0000
commit8a3f75fc247754ef764736f20bb6c24a8a930e8f (patch)
tree9cc55e29be54f46e17c01718a4c1ef1f599c90fb /lib/MGA
parent725103117a28269c68c228dac04ee5ff94c74510 (diff)
downloaddrakiso-8a3f75fc247754ef764736f20bb6c24a8a930e8f.tar
drakiso-8a3f75fc247754ef764736f20bb6c24a8a930e8f.tar.gz
drakiso-8a3f75fc247754ef764736f20bb6c24a8a930e8f.tar.bz2
drakiso-8a3f75fc247754ef764736f20bb6c24a8a930e8f.tar.xz
drakiso-8a3f75fc247754ef764736f20bb6c24a8a930e8f.zip
Use $grub_platform to detect EFI mode in bootloader.
This allows multibootusb to chain to the main grub.cfg file, regardless of the boot mode.
Diffstat (limited to 'lib/MGA')
-rw-r--r--lib/MGA/DrakISO/BuildBoot.pm11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/MGA/DrakISO/BuildBoot.pm b/lib/MGA/DrakISO/BuildBoot.pm
index ae84c34..367bf6e 100644
--- a/lib/MGA/DrakISO/BuildBoot.pm
+++ b/lib/MGA/DrakISO/BuildBoot.pm
@@ -353,7 +353,7 @@ sub build_grub2_cfg {
" fi",
if_($theme_name,
"",
- " if [ x\$efi == 'xtrue' ] ; then",
+ " if [ \$grub_platform == 'efi' ] ; then",
" set theme=\$grub2/themes/$theme_name/theme-efi.txt",
" else",
" set theme=\$grub2/themes/$theme_name/theme.txt",
@@ -362,7 +362,7 @@ sub build_grub2_cfg {
@loadfonts,
"",
),
- " if [ x\$efi == 'xtrue' ] ; then",
+ " if [ \$grub_platform == 'efi' ] ; then",
" set linux=linuxefi",
" set initrd=initrdefi",
" else",
@@ -404,10 +404,10 @@ sub build_grub2_cfg {
join("\n",
if_($command eq 'linuxefi',
- "if [ x\$efi == 'xtrue' ] ; then", # EFI only
+ "if [ \$grub_platform == 'efi' ] ; then", # EFI only
),
if_($command eq 'linux16',
- "if [ x\$efi != 'xtrue' ] ; then", # EFI doesn't support 16-bit
+ "if [ \$grub_platform != 'efi' ] ; then", # EFI doesn't support 16-bit
),
"menuentry $gettext\"$name\" {",
" $command $image " . join(' ', get_default_append($build), $append),
@@ -540,9 +540,6 @@ sub build_efi_grub2_cfg {
"search --no-floppy --set=root -l '" . $build->{media}{label} . "'",
"set prefix=(\$root)/boot/grub2",
"",
- "set efi=true",
- "export efi",
- "",
". \$prefix/grub.cfg",
"",
);