Add a gui menu for changed boot entries

Currently when the boot entries change, kexec-select-boot dies. Given
the normal loop is set up to catch this event and display a regular boot
menu at the next iteration of the loop, instead of dying it would be
better to just warn and then return from that function back into the
main loop. In addition to that I added a GUI menu for the same warning
when in GUI mode.
This commit is contained in:
Kyle Rankin 2018-04-04 14:25:22 -07:00
parent f60f0543d6
commit 5434e0bdf2
No known key found for this signature in database
GPG Key ID: 555577116BFA74B9

View File

@ -210,7 +210,12 @@ default_select() {
expectedoption=`cat $TMP_DEFAULT_FILE`
option=`head -n $default_index $TMP_MENU_FILE | tail -1`
if [ "$option" != "$expectedoption" ]; then
die "!!! Boot entry has changed - please set a new default"
if [ "$gui_menu" = "y" ]; then
whiptail --title 'ERROR: Boot Entry Has Changed' \
--msgbox "The list of boot entries has changed\n\nPlease set a new default" 16 60
fi
warn "!!! Boot entry has changed - please set a new default"
return
fi
parse_option