mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-28 18:19:23 +00:00
templates: Enable fwsetup on EFI platforms only
Only perform call to fwsetup if one is on EFI platform. On all other platforms fwsetup command does not exists, and thus returns 0 and a useless uefi-firmware menu entry gets generated. Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
2e32d23574
commit
ef562269bc
1 file changed
+7
-5
@@ -31,10 +31,12 @@ LABEL="UEFI Firmware Settings"
|
|||||||
gettext_printf "Adding boot menu entry for UEFI Firmware Settings ...\n" >&2
|
gettext_printf "Adding boot menu entry for UEFI Firmware Settings ...\n" >&2
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
fwsetup --is-supported
|
if [ "\$grub_platform" = "efi" ]; then
|
||||||
if [ "\$grub_platform" = "efi" -a "\$?" = 0 ]; then
|
fwsetup --is-supported
|
||||||
menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' {
|
if [ "\$?" = 0 ]; then
|
||||||
fwsetup
|
menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' {
|
||||||
}
|
fwsetup
|
||||||
|
}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
Reference in new issue
Block a user