grub2/grub2-linux.patch

47 lines
1.4 KiB
Diff

Index: util/grub.d/10_linux.in
===================================================================
--- util/grub.d/10_linux.in.orig
+++ util/grub.d/10_linux.in
@@ -30,7 +30,7 @@ CLASS="--class gnu-linux --class gnu --c
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]') ${CLASS}"
fi
@@ -84,7 +84,7 @@ EOF
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
echo $(printf "$(gettext "Loading Linux %s ...")" ${version})
- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
+ linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ${args}
EOF
if test -n "${initrd}" ; then
cat << EOF
@@ -97,9 +97,21 @@ EOF
EOF
}
+# do not output vmlinux if vmlinuz of same version exists
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
- done`
+ if grub_file_is_not_garbage "$i" ; then
+ case $i in
+ */vmlinux*)
+ j=${i/vmlinux/vmlinuz}
+ k=${j/.gz/}
+ if test ! -e $k ; then echo -n "$i "; fi
+ ;;
+ *)
+ echo -n "$i "
+ ;;
+ esac
+ fi
+ done`
prepare_boot_cache=
while [ "x$list" != "x" ] ; do