bootloader: Fix searching for grub-mkconfig

Currently if grub2-mkconfig does not exist - bootloader element
finalise script will fail with:

type: grub2-mkconfig: not found
Change-Id: I27e82c410b8fa1a7504c71df204602c840ef996d
This commit is contained in:
Michal Nasiadka
2025-05-12 13:50:12 +02:00
parent 46321ffb84
commit bb09c642ca

View File

@@ -50,7 +50,7 @@ if [ -z "$GRUBNAME" ]; then
GRUBNAME=$(type -p grub2-install)
fi
if type grub2-mkconfig >/dev/null; then
if type grub2-mkconfig >/dev/null 2>&1; then
GRUB_MKCONFIG="grub2-mkconfig"
else
GRUB_MKCONFIG="grub-mkconfig"