From 5946c6ef326e3c19ab3fe632bb8f49a482759e89 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 29 Mar 2017 02:48:12 +0200 Subject: [PATCH] Add support for grub submenu hotkeys --- debian/changelog | 3 +++ tools/boot/stretch/parse_isolinux | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 2cf04d34..13455586 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ debian-cd (3.1.20) UNRELEASED; urgency=medium * Add https bits to tools/generate_di+k_list (#855035) * Fix missing full path for cztz call in tools/grab_md5 (Closes: #855174) + [ Samuel Thibault ] + * Add support for grub submenu hotkeys. + -- Raphaƫl Hertzog Fri, 27 Jan 2017 13:59:40 +0100 debian-cd (3.1.19) unstable; urgency=medium diff --git a/tools/boot/stretch/parse_isolinux b/tools/boot/stretch/parse_isolinux index 8c97804e..4e623f42 100755 --- a/tools/boot/stretch/parse_isolinux +++ b/tools/boot/stretch/parse_isolinux @@ -199,7 +199,12 @@ foreach my $line(@lines) { } $menu{"title"} = $1; if ($new_menu) { - print_indent "submenu '$pre" . $menu{"title"} . " ...' {\n"; + my $hotkey = ""; + if ($menu{"label"} =~ m,\^(\S),) { + $hotkey = lc "--hotkey=$1 "; + $menu{"label"} =~ s/\^//; + } + print_indent "submenu $hotkey'$pre" . $menu{"label"} . " ...' {\n"; $menu_title[$menudepth] = $menu{"title"}; $menudepth++; if ($menudepth > 1) { @@ -223,6 +228,8 @@ foreach my $line(@lines) { $in_kernel = 1; } elsif ($line =~ /menu label (.*)$/ && $in_kernel) { $kernel{"label"} = $1; + } elsif ($line =~ /menu label (.*)$/) { + $menu{"label"} = $1; } elsif ($line =~ /menu default/ && $in_kernel) { $kernel{"default"} = 1; } elsif ($line =~ /kernel (.*)$/ && $in_kernel) {