gui-init: use direct boot device selection

If the boot device is invalid or unabled to be mounted
and the user opts to select a new boot device, jump
directly to that menu option and avoid the additional
step of showing the config main menu.

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
Matt DeVillier 2019-07-08 22:27:40 -05:00
parent 258783e98e
commit 0690c8c011
No known key found for this signature in database
GPG Key ID: 2BBB776A35B978FD

View File

@ -15,7 +15,7 @@ mount_boot()
if [ ! -e "$CONFIG_BOOT_DEV" ]; then
if (whiptail $CONFIG_ERROR_BG_COLOR --clear --title "ERROR: $CONFIG_BOOT_DEV missing!" \
--yesno "The /boot device $CONFIG_BOOT_DEV could not be found!\n\nYou will need to configure the correct device for /boot.\n\nWould you like to configure the /boot device now?" 30 90) then
config-gui.sh
config-gui.sh boot_device_select
else
# exit to main menu
break
@ -27,7 +27,7 @@ mount_boot()
if [ $? -ne 0 ]; then
if (whiptail $CONFIG_ERROR_BG_COLOR --clear --title 'ERROR: Cannot mount /boot' \
--yesno "The /boot partition at $CONFIG_BOOT_DEV could not be mounted!\n\nWould you like to configure the /boot device now?" 30 90) then
config-gui.sh
config-gui.sh boot_device_select
else
recovery "Unable to mount /boot"
fi