kexec-select-boot: Skip duplicate prompt when setting new default boot entry

The text based prompt isn't needed when using a GUI menu for selection/confirmation, so skip it

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
Matt DeVillier 2022-03-15 12:03:04 -05:00
parent 19067a9a72
commit 025f914eb3
No known key found for this signature in database
GPG Key ID: 2BBB776A35B978FD

@ -185,11 +185,13 @@ scan_options() {
}
save_default_option() {
read \
-n 1 \
-p "Saving a default will modify the disk. Proceed? (Y/n): " \
default_confirm
echo
if [ "$gui_menu" != "y" ]; then
read \
-n 1 \
-p "Saving a default will modify the disk. Proceed? (Y/n): " \
default_confirm
echo
fi
[ "$default_confirm" = "" ] && default_confirm="y"
if [[ "$default_confirm" = "y" || "$default_confirm" = "Y" ]]; then