diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-02-10 13:53:23 -0600 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-02-10 13:53:23 -0600 |
commit | be9dd340ef7d752d61d0d3b4b6b18164016f4605 (patch) | |
tree | 22466eb7977fbe9ae29dc83ac61ea9f77f86d0e7 /libre-testing/grub2/archlinux_grub2_mkconfig_fixes.patch | |
parent | 9b6fb533bdf48dc4bc3adb21c57366090aa6c5f6 (diff) | |
parent | ca888a4fabb768d38874b5f983cd84eba801ae7f (diff) |
Merge http://projects.parabolagnulinux.org/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}" |