Skip to content

Commit 1d14855

Browse files
nestiredaringer
authored andcommitted
add return to main menu to boot options menu
1 parent b428b5b commit 1d14855

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

initrd/bin/kexec-select-boot

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,12 @@ get_menu_option() {
123123
whiptail --title "Select your boot option" \
124124
--menu "Choose the boot option [1-$n, a to abort]:" 0 80 8 \
125125
-- $MENU_OPTIONS \
126+
'a' ' <-- Return to main menu' \
126127
2>/tmp/whiptail || die "Aborting boot attempt"
127128

128129
option_index=$(cat /tmp/whiptail)
129-
else
130+
131+
else #FIXME legacy code, not used anymore
130132
echo "+++ Select your boot option:"
131133
n=0
132134
while read option
@@ -140,12 +142,12 @@ get_menu_option() {
140142
-p "Choose the boot option [1-$n, a to abort]: " \
141143
option_index
142144

143-
if [ "$option_index" = "a" ]; then
144-
die "Aborting boot attempt"
145-
fi
145+
fi
146+
147+
if [ "$option_index" = "a" ]; then
148+
die "Aborting boot attempt" #will return to main menu
146149
fi
147150
first_menu="n"
148-
149151
option=`head -n $option_index $TMP_MENU_FILE | tail -1`
150152
parse_option
151153
}

0 commit comments

Comments
 (0)