From 5ff3849c169e8afe0ea61cc995cf3c70e192b059 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Tue, 9 Jul 2019 11:43:06 -0500 Subject: [PATCH] kecec_select_boot: default to Y when setting new boot option Next prompt will be to ensure GPG key is attached, which defaults to Y, so default here as well for consistency Signed-off-by: Matt DeVillier --- initrd/bin/kexec-select-boot | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/initrd/bin/kexec-select-boot b/initrd/bin/kexec-select-boot index 36b35a61..793d6a79 100755 --- a/initrd/bin/kexec-select-boot +++ b/initrd/bin/kexec-select-boot @@ -186,11 +186,12 @@ scan_options() { save_default_option() { read \ -n 1 \ - -p "Saving a default will modify the disk. Proceed? (y/n): " \ + -p "Saving a default will modify the disk. Proceed? (Y/n): " \ default_confirm echo - if [ "$default_confirm" = "y" ]; then + [ "$default_confirm" = "" ] && default_confirm="y" + if [[ "$default_confirm" = "y" || "$default_confirm" = "Y" ]]; then if kexec-save-default \ -b "$bootdir" \ -d "$paramsdev" \