Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 361140 Details for
Bug 488386
sys-boot/grub-2.00_p5107-r1: more configurable menu generation
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch which implement these features
customize_menu.patch (text/plain), 4.60 KB, created by
Alex Efros
on 2013-10-17 16:27:32 UTC
(
hide
)
Description:
patch which implement these features
Filename:
MIME Type:
Creator:
Alex Efros
Created:
2013-10-17 16:27:32 UTC
Size:
4.60 KB
patch
obsolete
>diff -uNr grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.in >--- grub-2.00.orig/util/grub.d/10_linux.in 2013-08-04 22:24:58.000000000 +0300 >+++ grub-2.00/util/grub.d/10_linux.in 2013-10-17 18:33:59.820157424 +0300 >@@ -98,7 +98,12 @@ > fi > echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/" > else >- echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" >+ if [ "x$GRUB_SIMPLE_VERSION" = xtrue ]; then >+ title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" >+ else >+ title="${os}" >+ fi >+ echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" > fi > if [ x$type != xrecovery ] ; then > save_default_entry | grub_add_tab >@@ -161,6 +166,9 @@ > if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi > done` ;; > esac >+list_simple=(`for i in ${GRUB_MENU_LINUX} ; do >+ if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi >+ done`) > > case "$machine" in > i?86) GENKERNEL_ARCH="x86" ;; >@@ -179,9 +187,15 @@ > # yet, so it's empty. In a submenu it will be equal to '\t' (one tab). > submenu_indentation="" > >+submenu_tmpfile=/tmp/grub.10_linux.submenu.$$ >+exec 3>$submenu_tmpfile >+ > is_first_entry=true > while [ "x$list" != "x" ] ; do > linux=`version_find_latest $list` >+ if [ ${#list_simple[*]} -gt 0 ]; then >+ linux=${list_simple[0]} >+ fi > gettext_printf "Found linux image: %s\n" "$linux" >&2 > basename=`basename $linux` > dirname=`dirname $linux` >@@ -189,6 +203,7 @@ > version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` > alt_version=`echo $version | sed -e "s,\.old$,,g"` > linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" >+ cmdline_linux_custom=$(grub_cmdline_linux_custom ${version}) > > initrd= > for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ >@@ -226,24 +241,28 @@ > linux_root_device_thisversion=${GRUB_DEVICE} > fi > >+ submenu_indentation="" > if [ "x$is_first_entry" = xtrue ]; then > linux_entry "${OS}" "${version}" simple \ >- "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" >+ "${GRUB_CMDLINE_LINUX} ${cmdline_linux_custom:-${GRUB_CMDLINE_LINUX_DEFAULT}}" > >- submenu_indentation="$grub_tab" >- > if [ -z "$boot_device_id" ]; then > boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" > fi > # TRANSLATORS: %s is replaced with an OS name >- echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {" >+ echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {" >&3 >+ elif [ ${#list_simple[*]} -gt 0 ]; then >+ linux_entry "${OS}" "${version}" simple \ >+ "${GRUB_CMDLINE_LINUX} ${cmdline_linux_custom:-${GRUB_CMDLINE_LINUX_DEFAULT}}" > fi >+ list_simple=(${list_simple[*]:1}) > >- linux_entry "${OS}" "${version}" advanced \ >- "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" >+ submenu_indentation="$grub_tab" >+ linux_entry "${OS}" "${version}" advanced \ >+ "${GRUB_CMDLINE_LINUX} ${cmdline_linux_custom:-${GRUB_CMDLINE_LINUX_DEFAULT}}" >&3 > if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then > linux_entry "${OS}" "${version}" recovery \ >- "single ${GRUB_CMDLINE_LINUX}" >+ "single ${GRUB_CMDLINE_LINUX}" >&3 > fi > > list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` >@@ -253,7 +272,10 @@ > # If at least one kernel was found, then we need to > # add a closing '}' for the submenu command. > if [ x"$is_first_entry" != xtrue ]; then >- echo '}' >+ echo '}' >&3 >+ exec 3>&- >+ cat $submenu_tmpfile >+ rm $submenu_tmpfile > fi > > echo "$title_correction_code" >diff -uNr grub-2.00.orig/util/grub-mkconfig.in grub-2.00/util/grub-mkconfig.in >--- grub-2.00.orig/util/grub-mkconfig.in 2013-08-15 20:09:04.000000000 +0300 >+++ grub-2.00/util/grub-mkconfig.in 2013-10-17 18:34:42.388156992 +0300 >@@ -192,6 +192,8 @@ > GRUB_BUTTON_CMOS_ADDRESS \ > GRUB_BUTTON_CMOS_CLEAN \ > GRUB_DISTRIBUTOR \ >+ GRUB_SIMPLE_VERSION \ >+ GRUB_MENU_LINUX \ > GRUB_CMDLINE_LINUX \ > GRUB_CMDLINE_LINUX_DEFAULT \ > GRUB_CMDLINE_XEN \ >@@ -217,6 +219,8 @@ > GRUB_ENABLE_CRYPTODISK \ > GRUB_BADRAM > >+export -f grub_cmdline_linux_custom >+ > if test "x${grub_cfg}" != "x"; then > rm -f "${grub_cfg}.new" > oldumask=$(umask); umask 077
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 488386
: 361140