mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
Skip prompt to set default boot when booting from USB
Since a USB boot target can't be the default (at least currently, /boot must be on internal media), skip the extraneous prompt to set it as such when booting from USB. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
3306dbb66d
commit
65d669d408
@ -14,7 +14,8 @@ valid_rollback="n"
|
||||
force_menu="n"
|
||||
gui_menu="n"
|
||||
force_boot="n"
|
||||
while getopts "b:d:p:a:r:c:uimgf" arg; do
|
||||
skip_confirm="n"
|
||||
while getopts "b:d:p:a:r:c:uimgfs" arg; do
|
||||
case $arg in
|
||||
b) bootdir="$OPTARG" ;;
|
||||
d) paramsdev="$OPTARG" ;;
|
||||
@ -27,6 +28,7 @@ while getopts "b:d:p:a:r:c:uimgf" arg; do
|
||||
i) valid_hash="y"; valid_rollback="y" ;;
|
||||
g) gui_menu="y" ;;
|
||||
f) force_boot="y"; valid_hash="y"; valid_rollback="y" ;;
|
||||
s) skip_confirm="y" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -255,7 +257,7 @@ user_select() {
|
||||
do
|
||||
get_menu_option
|
||||
# In force boot mode, no need offer the option to set a default, just boot
|
||||
if [ "$force_boot" = "y" ]; then
|
||||
if [[ "$force_boot" = "y" || "$skip_confirm" = "y" ]]; then
|
||||
do_boot
|
||||
else
|
||||
confirm_menu_option
|
||||
|
@ -81,9 +81,9 @@ fi
|
||||
echo "!!! Could not find any ISO, trying bootable USB"
|
||||
# Attempt to pull verified config from device
|
||||
if [ -x /bin/whiptail ]; then
|
||||
kexec-select-boot -b /media -c "*.cfg" -u -g
|
||||
kexec-select-boot -b /media -c "*.cfg" -u -g -s
|
||||
else
|
||||
kexec-select-boot -b /media -c "*.cfg" -u
|
||||
kexec-select-boot -b /media -c "*.cfg" -u -s
|
||||
fi
|
||||
|
||||
die "Something failed in selecting boot"
|
||||
|
Loading…
Reference in New Issue
Block a user