File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments