mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-20 09:16:21 +00:00
config-gui: mount new /boot after selection
Users may wish to temporarily boot an OS from a drive other than their primary boot drive, without changing the default and saving to ROM. Mounting /boot after changing the device selection facilitates this by allowing the user to then choose an unsafe boot from the newly-selected boot drive. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
0599ce97af
commit
5dc9b0b457
@ -101,6 +101,15 @@ while true; do
|
||||
replace_config /etc/config.user "CONFIG_BOOT_DEV" "$SELECTED_FILE"
|
||||
combine_configs
|
||||
|
||||
# mount newly selected /boot device
|
||||
if ! ( umount /boot 2>/tmp/error && \
|
||||
mount -o ro $SELECTED_FILE /boot 2>/tmp/error ); then
|
||||
ERROR=`cat /tmp/error`
|
||||
whiptail $CONFIG_ERROR_BG_COLOR --title 'ERROR: unable to mount /boot' \
|
||||
--msgbox "Unable to un/re-mount /boot:\n\n$ERROR" 16 60
|
||||
exit 1
|
||||
fi
|
||||
|
||||
whiptail --title 'Config change successful' \
|
||||
--msgbox "The /boot device was successfully changed to $SELECTED_FILE" 16 60
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user