[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suppress error message and do not wait for keystroke
From: |
Steve |
Subject: |
Re: Suppress error message and do not wait for keystroke |
Date: |
Wed, 29 Dec 2021 12:33:21 +0000 |
Remove read command
On Tue, 28 Dec 2021, 22:33 Christoph Pleger, <
Christoph.Pleger@cs.tu-dortmund.de> wrote:
> Hello,
>
> intentionally, I use the search command to search for files that are
> not necessarily present, like this:
>
> if search --file --set root /EFI/debian/grubx64.efi; then
> chainloader ($root)/EFI/debian/grubx64.efi
> elif search --file --set root /EFI/ubuntu/grubx64.efi; then
> chainloader ($root)/EFI/ubuntu/grubx64.efi
> elif search --file --set root /EFI/Microsoft/Boot/bootmgfw.efi; then
> chainloader ($root)/EFI/Microsoft/Boot/bootmgfw.efi
> else
> echo "No usable bootloader file found, press <Enter> to
> reboot"
> read
> fi
>
> Unfortunately, when a file is not found, an error message appears and a
> keystroke is expected. Is it somehow possible to suppress the error
> message and not wait for a key to be pressed?
>
> Regards
> Christoph
>
>
>