Last active
October 15, 2024 18:20
-
-
Save mjkloeckner/214a0ee42c920affe572e12e933a1bb0 to your computer and use it in GitHub Desktop.
Revisions
-
mjkloeckner revised this gist
Oct 15, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ --- /etc/grub.d/10_linux +++ /etc/grub.d/10_linux @@ -144,7 +144,7 @@ fi -
mjkloeckner revised this gist
Oct 15, 2024 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,6 @@ --- /tmp/10_linux +++ /etc/grub.d/10_linux @@ -144,7 +144,7 @@ fi printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" fi @@ -11,13 +9,15 @@ index 42f81f2..2ab2850 100755 sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} rw ${args} @@ -217,6 +217,7 @@ dirname=`dirname $linux` rel_dirname=`make_system_path_relative_to_its_root $dirname` version=`echo $basename | sed -e "s,vmlinuz-,,g"` + display_version=`file $linux | grep -oP '(?<=version )\S*'` alt_version=`echo $version | sed -e "s,\.old$,,g"` linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" @@ -290,7 +291,7 @@ fi if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then -
mjkloeckner revised this gist
Oct 15, 2024 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ diff --git /tmp/10_linux /etc/grub.d/10_linux index 42f81f2..2ab2850 100755 --- a/tmp/10_linux +++ b/etc/grub.d/10_linux @@ -16,8 +16,6 @@ index 42f81f2..2ab2850 100755 rel_dirname=`make_system_path_relative_to_its_root $dirname` version=`echo $basename | sed -e "s,vmlinuz-,,g"` + display_version=`file $linux | grep -oP '(?<=version )\S*'` alt_version=`echo $version | sed -e "s,\.old$,,g"` @@ -292,7 +293,7 @@ for linux in ${reverse_sorted_list}; do fi -
mjkloeckner created this gist
Oct 15, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ diff --git a/tmp/10_linux b/etc/grub.d/10_linux index 42f81f2..2ab2850 100755 --- a/tmp/10_linux +++ b/etc/grub.d/10_linux @@ -144,7 +144,7 @@ linux_entry () fi printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" fi - message="$(gettext_printf "Loading Linux %s ..." ${version})" + message="$(gettext_printf "Loading Linux %s ..." ${display_version})" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} rw ${args} @@ -217,6 +217,7 @@ for linux in ${reverse_sorted_list}; do dirname=`dirname $linux` rel_dirname=`make_system_path_relative_to_its_root $dirname` version=`echo $basename | sed -e "s,vmlinuz-,,g"` + display_version=`file $linux | grep -oP '(?<=version )\S*'` # version=`file $linux | grep -oP '(?<=version )\S*')` # gettext_printf "version: %s\n" "$version" >&2 alt_version=`echo $version | sed -e "s,\.old$,,g"` @@ -292,7 +293,7 @@ for linux in ${reverse_sorted_list}; do fi if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then - linux_entry "${OS}" "${version}" simple \ + linux_entry "${OS}" "${display_version}" simple \ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" submenu_indentation="$grub_tab"