updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / burg-efi-x86_64-bzr / arch-burg.patch
blob22dbaaba87ded7eb0e02f766ccf68c1bd3b9a75e
1 --- orig/util/grub.d/10_linux.in 2011-08-08 11:17:57.946312000 -0400
2 +++ new/util/grub.d/10_linux.in 2011-08-08 20:01:37.745654006 -0400
3 @@ -51,7 +51,7 @@
4 || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
5 LINUX_ROOT_DEVICE=${GRUB_DEVICE}
6 else
7 - LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
8 + LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
9 fi
11 linux_entry ()
12 @@ -62,10 +62,8 @@
13 args="$4"
14 if ${recovery} ; then
15 title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
16 - auth_option=${AUTH_RESCUE}
17 else
18 title="$(gettext_quoted "%s, with Linux %s")"
19 - auth_option=${AUTH_NORMAL}
21 printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
22 save_default_entry | sed -e "s/^/\t/"
23 @@ -104,7 +102,7 @@
24 EOF
27 -list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
28 +list=`for i in $( find / /boot -maxdepth 1 -name 'vmlinu[xz]*' ! -type l ) ; do
29 if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
30 done`
31 prepare_boot_cache=
32 @@ -116,14 +114,13 @@
33 dirname=`dirname $linux`
34 rel_dirname=`make_system_path_relative_to_its_root $dirname`
35 version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
36 - alt_version=`echo $version | sed -e "s,\.old$,,g"`
37 + echo $basename | grep -q 'vmlinu[xz]26' && initname=kernel || initname=initramfs
38 + base_init=`echo $basename | sed -e "s,vmlinu[xz],$initname,g"`
39 + alt_version="${base_init}-fallback"
40 linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
42 initrd=
43 - for i in "initrd.img-${version}" "initrd-${version}.img" \
44 - "initrd-${version}" "initramfs-${version}.img" \
45 - "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
46 - "initrd-${alt_version}" "initramfs-${alt_version}.img"; do
47 + for i in "${base_init}.img"; do
48 if test -e "${dirname}/${i}" ; then
49 initrd="$i"
50 break
51 @@ -138,6 +135,9 @@
53 linux_entry "${OS}" "${version}" false \
54 "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
55 + initrd="${alt_version}.img"
56 + linux_entry "${OS}" "${version} Fallback" false \
57 + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
58 if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
59 linux_entry "${OS}" "${version}" true \
60 "single ${GRUB_CMDLINE_LINUX}"