diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-02-12 13:01:00 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-02-12 13:01:00 -0300 |
commit | 1a47fcae076047932614b9c19fb49f5f8c9791bb (patch) | |
tree | 19a8770d7170f435ec56e9c98505becc8271e24e /libre-testing/grub2/archlinux_grub2_mkconfig_fixes.patch | |
parent | 18019242c4e527f7140f92336061562b8cfb50fb (diff) | |
parent | e9447f47dcf11be3dc905e72374b0e4298a4c112 (diff) |
Merge branch 'master' of ssh://vparabola/srv/git/projects/abslibre
Diffstat (limited to 'libre-testing/grub2/archlinux_grub2_mkconfig_fixes.patch')
-rw-r--r-- | libre-testing/grub2/archlinux_grub2_mkconfig_fixes.patch | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/libre-testing/grub2/archlinux_grub2_mkconfig_fixes.patch b/libre-testing/grub2/archlinux_grub2_mkconfig_fixes.patch new file mode 100644 index 000000000..62acd2ee8 --- /dev/null +++ b/libre-testing/grub2/archlinux_grub2_mkconfig_fixes.patch @@ -0,0 +1,93 @@ +diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in +index b041a38..6f31dce 100644 +--- a/util/grub-mkconfig.in ++++ b/util/grub-mkconfig.in +@@ -252,6 +252,8 @@ export GRUB_DEFAULT \ + GRUB_THEME \ + GRUB_GFXPAYLOAD_LINUX \ + GRUB_DISABLE_OS_PROBER \ ++ GRUB_COLOR_NORMAL \ ++ GRUB_COLOR_HIGHLIGHT \ + GRUB_INIT_TUNE \ + GRUB_SAVEDEFAULT \ + GRUB_BADRAM +diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in +index 420b3f3..79fd4fb 100644 +--- a/util/grub.d/00_header.in ++++ b/util/grub.d/00_header.in +@@ -100,6 +100,14 @@ cat <<EOF + + EOF + ++if [ x$GRUB_COLOR_NORMAL != x ] && [ x$GRUB_COLOR_HIGHLIGHT != x ] ; then ++ cat << EOF ++set menu_color_normal=$GRUB_COLOR_NORMAL ++set menu_color_highlight=$GRUB_COLOR_HIGHLIGHT ++ ++EOF ++fi ++ + serial=0; + gfxterm=0; + for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do +diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in +index a09c3e6..cf12ea9 100644 +--- a/util/grub.d/10_linux.in ++++ b/util/grub.d/10_linux.in +@@ -31,8 +31,8 @@ CLASS="--class gnu-linux --class gnu --class os" + if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then + OS=GNU/Linux + else +- OS="${GRUB_DISTRIBUTOR} GNU/Linux" +- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}" ++ OS="${GRUB_DISTRIBUTOR}" ++ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | tr -d ' ') ${CLASS}" + fi + + # loop-AES arranges things so that /dev/loop/X can be our root device, but +@@ -48,7 +48,7 @@ if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" + || uses_abstraction "${GRUB_DEVICE}" lvm; then + LINUX_ROOT_DEVICE=${GRUB_DEVICE} + else +- LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} ++ LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" + fi + + linux_entry () +@@ -111,7 +111,7 @@ EOF + EOF + } + +-list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* ; do ++list=`for i in /boot/vmlinuz* /boot/vmlinux* /vmlinuz* /vmlinux* ; do + if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi + done` + prepare_boot_cache= +@@ -123,14 +123,12 @@ while [ "x$list" != "x" ] ; do + dirname=`dirname $linux` + rel_dirname=`make_system_path_relative_to_its_root $dirname` + version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` +- alt_version=`echo $version | sed -e "s,\.old$,,g"` ++ base_init=`echo $basename | sed -e "s,vmlinuz,kernel,g"` ++ alt_version="${base_init}-fallback" + linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" + + initrd= +- for i in "initrd.img-${version}" "initrd-${version}.img" \ +- "initrd-${version}" "initramfs-${version}.img" \ +- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ +- "initrd-${alt_version}" "initramfs-${alt_version}.img"; do ++ for i in "${base_init}.img"; do + if test -e "${dirname}/${i}" ; then + initrd="$i" + break +@@ -155,6 +153,9 @@ while [ "x$list" != "x" ] ; do + + linux_entry "${OS}" "${version}" false \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" ++ initrd="${alt_version}.img" ++ linux_entry "${OS}" "${version} Fallback" false \ ++ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" + if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then + linux_entry "${OS}" "${version}" true \ + "single ${GRUB_CMDLINE_LINUX}" |