burg-bzr: fix patch

This commit is contained in:
Phil 2011-12-25 19:01:31 +00:00
parent 5f674858cc
commit dfec3b538c
2 changed files with 72 additions and 1 deletions

View File

@ -36,7 +36,7 @@ if [[ "${_mk_burg_emu}" == 'y' ]]; then
fi fi
md5sums=('39a0e3f1035342d75a9eda7a65f9793f' md5sums=('39a0e3f1035342d75a9eda7a65f9793f'
'04aff93772dcd9eb8acff54461e7ae7f' '743c7f6cec624bf0c696dae83b6e4d06'
'60bdcc9a3f86deb4f1a361f3bea4ae98' '60bdcc9a3f86deb4f1a361f3bea4ae98'
'990eba4f3cb1808c97c2972de6957a3c' '990eba4f3cb1808c97c2972de6957a3c'
'460a91c0998117285decdb176ad98ee1') '460a91c0998117285decdb176ad98ee1')

View File

@ -0,0 +1,71 @@
--- orig/util/grub.d/10_linux.in 2011-08-08 11:17:57.946312000 -0400
+++ new/util/grub.d/10_linux.in 2011-08-08 20:01:37.745654006 -0400
@@ -51,7 +51,7 @@ if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; 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 ()
@@ -60,14 +60,17 @@ linux_entry ()
version="$2"
recovery="$3"
args="$4"
+ if [ "${version}" = "lts" ] ; then
+ _kernel=LTS
+ else
+ _kernel=Standard
+ fi
if ${recovery} ; then
- title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
- auth_option=${AUTH_RESCUE}
+ title="$(gettext_quoted "%s, with ${_kernel}-Kernel (recovery mode)")"
else
- title="$(gettext_quoted "%s, with Linux %s")"
- auth_option=${AUTH_NORMAL}
+ title="$(gettext_quoted "%s, with ${_kernel}-Kernel")"
fi
- printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
+ printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}"
save_default_entry | sed -e "s/^/\t/"
# Use ELILO's generic "efifb" when it's known to be available.
@@ -104,7 +102,7 @@
EOF
}
-list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
+list=`for i in $( find / /boot -maxdepth 1 -name 'vmlinu[xz]*' ! -type l ) ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
prepare_boot_cache=
@@ -116,14 +114,13 @@
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"`
+ echo $basename | grep -q 'vmlinu[xz]26' && initname=kernel || initname=initramfs
+ base_init=`echo $basename | sed -e "s,vmlinu[xz],$initname,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
@@ -139,6 +139,7 @@ while [ "x$list" != "x" ] ; do
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
+ initrd="initramfs-${alt_version}.img"
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
fi