help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unknown command 'else'?


From: Andrei Borzenkov
Subject: Re: Unknown command 'else'?
Date: Fri, 18 Sep 2015 07:00:31 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

18.09.2015 06:38, Steven Shiau пишет:
Dear all,
I encountered an issue "Unknown command 'else'." when embedding a config
in uEFI network boot image.

embedded config is processed before normal.mod is loaded so only commands in rescue mode are available. bash like scripting is feature of normal.mod.

The machine is running Debian Sid, with
grub-pc version 2.02~beta2-28.
The command I use to create the image is:
grub-mkimage -C xz -O x86_64-efi -o /tftpboot/nbi_img/bootx64.efi
--prefix='(tftp)/grub-efi.cfg/' -c /tmp/grub-efi/grub-header.cfg normal
tftp efinet chain echo net gzio xzio linux efi_gop efi_uga png gfxterm
gfxterm_background gfxterm_menu serial part_gpt part_msdos boot
multiboot progress search reboot halt configfile test sleep

Then content of /tmp/grub-efi/grub-header.cfg is:
=============================
set prefix=(tftp)/grub-efi.cfg
echo 'Network status: '
net_ls_cards
net_ls_addr
net_ls_routes

if [ -e "$prefix/grub.cfg-$net_default_mac" ]; then
   configfile $prefix/grub.cfg-$net_default_mac
elif [ -e "$prefix/grub.cfg" ]; then
   configfile $prefix/grub.cfg
else
   echo "Could not find config file $prefix/grub.cfg-$net_default_mac or
$prefix/grub.cfg!"
   sleep 10
fi
=============================

Attached you can find the error on the screen.
Where am I wrong?
Thanks.

Steven.



_______________________________________________
Help-grub mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-grub





reply via email to

[Prev in Thread] Current Thread [Next in Thread]