Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
ebae102f
Commit
ebae102f
authored
Feb 23, 2022
by
longpanda
Browse files
Fix the issue when set F2> as the default menu item.
parent
c3718d60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
24 deletions
+26
-24
INSTALL/grub/grub.cfg
INSTALL/grub/grub.cfg
+26
-24
No files found.
INSTALL/grub/grub.cfg
View file @
ebae102f
...
@@ -2321,6 +2321,32 @@ export VTOY_HELP_TXT_LANGUAGE
...
@@ -2321,6 +2321,32 @@ export VTOY_HELP_TXT_LANGUAGE
export VTOY_CHKSUM_FILE_PATH
export VTOY_CHKSUM_FILE_PATH
#colect all image files (iso files)
set ventoy_img_count=0
vt_list_img $vtoy_iso_part ventoy_img_count
#Main menu
if [ $ventoy_img_count -gt 0 ]; then
if [ $VTOY_DEFAULT_MENU_MODE -eq 0 ]; then
vt_dynamic_menu 0 0
else
vt_dynamic_menu 0 1
fi
else
if [ -n "$VTOY_NO_ISO_TIP" ]; then
NO_ISO_MENU="No ISO files found, $VTOY_NO_ISO_TIP"
elif [ -n "$VTOY_DEFAULT_SEARCH_ROOT" ]; then
NO_ISO_MENU="No ISO files found, please check VTOY_DEFAULT_SEARCH_ROOT"
else
NO_ISO_MENU="No ISO files found"
fi
menuentry "$NO_ISO_MENU (Press enter to reboot ...)" {
echo -e "\n Rebooting ... "
reboot
}
fi
#special VTOY_DEFAULT_IMAGE process
#special VTOY_DEFAULT_IMAGE process
if [ -n "$VTOY_DEFAULT_IMAGE" ]; then
if [ -n "$VTOY_DEFAULT_IMAGE" ]; then
if regexp --set 1:vtHotkey --set 2:vtDefault "(F[2-9])>(.*)" "$VTOY_DEFAULT_IMAGE"; then
if regexp --set 1:vtHotkey --set 2:vtDefault "(F[2-9])>(.*)" "$VTOY_DEFAULT_IMAGE"; then
...
@@ -2351,27 +2377,3 @@ if [ -n "$VTOY_DEFAULT_IMAGE" ]; then
...
@@ -2351,27 +2377,3 @@ if [ -n "$VTOY_DEFAULT_IMAGE" ]; then
fi
fi
fi
fi
#colect all image files (iso files)
set ventoy_img_count=0
vt_list_img $vtoy_iso_part ventoy_img_count
#Main menu
if [ $ventoy_img_count -gt 0 ]; then
if [ $VTOY_DEFAULT_MENU_MODE -eq 0 ]; then
vt_dynamic_menu 0 0
else
vt_dynamic_menu 0 1
fi
else
if [ -n "$VTOY_NO_ISO_TIP" ]; then
NO_ISO_MENU="No ISO files found, $VTOY_NO_ISO_TIP"
elif [ -n "$VTOY_DEFAULT_SEARCH_ROOT" ]; then
NO_ISO_MENU="No ISO files found, please check VTOY_DEFAULT_SEARCH_ROOT"
else
NO_ISO_MENU="No ISO files found"
fi
menuentry "$NO_ISO_MENU (Press enter to reboot ...)" {
echo -e "\n Rebooting ... "
reboot
}
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment