From 025f914eb3d868be80dccac14994d61496b50bc2 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Tue, 15 Mar 2022 12:03:04 -0500 Subject: [PATCH] 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 --- initrd/bin/kexec-select-boot | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/initrd/bin/kexec-select-boot b/initrd/bin/kexec-select-boot index dd688f22..d0266c46 100755 --- a/initrd/bin/kexec-select-boot +++ b/initrd/bin/kexec-select-boot @@ -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