[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Suppress error message and do not wait for keystroke
From: |
Christoph Pleger |
Subject: |
Suppress error message and do not wait for keystroke |
Date: |
Tue, 28 Dec 2021 19:44:49 +0100 |
User-agent: |
Evolution 3.38.3-1 |
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
- Suppress error message and do not wait for keystroke,
Christoph Pleger <=