cat << EOF
#
-@@ -289,13 +294,16 @@
+@@ -286,7 +291,7 @@
gettext_printf "Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/sysconfig/grub
and /etc/grub.d/* files or please file a bug report with
-%s file attached." "${grub_cfg}.new" >&2
-- echo >&2
+%s file attached." "${grub_cfg}.new" >&3
-+ echo >&3
+ echo >&2
+ exit 1
else
- # none of the children aborted with error, install the new grub.cfg
- mv -f ${grub_cfg}.new ${grub_cfg}
+@@ -295,5 +300,8 @@
fi
fi
--- grub-2.02~beta2.orig/util/grub.d/10_kfreebsd.in 2013-12-17 18:25:57.000000000 +0100
+++ grub-2.02~beta2/util/grub.d/10_kfreebsd.in 2014-01-04 11:34:50.135240649 +0100
@@ -158,7 +158,7 @@
+ is_top_level=true
- while [ "x$list" != "x" ] ; do
- kfreebsd=`version_find_latest $list`
+ for kfreebsd in ${reverse_sorted_list}; do
- gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&2
+ gettext_printf "Found kernel of FreeBSD: %s\n" "$kfreebsd" >&3
basename=`basename $kfreebsd`
module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
fi
-diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_linux.in grub-2.02~beta2/util/grub.d/10_linux.in
---- grub-2.02~beta2.orig/util/grub.d/10_linux.in 2014-01-04 10:50:51.000000000 +0100
-+++ grub-2.02~beta2/util/grub.d/10_linux.in 2014-01-04 11:34:50.135240649 +0100
-@@ -176,7 +176,7 @@
+--- grub-2.04/util/grub.d/10_linux.in.orig 2018-11-24 18:13:02.000000000 +0100
++++ grub-2.04/util/grub.d/10_linux.in 2019-07-05 13:53:33.737370014 +0200
+@@ -194,7 +194,7 @@
+
is_top_level=true
- while [ "x$list" != "x" ] ; do
- linux=`version_find_latest $list`
+ for linux in ${reverse_sorted_list}; do
- gettext_printf "Found linux image: %s\n" "$linux" >&2
+ gettext_printf "Found linux image: %s\n" "$linux" >&3
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
-@@ -213,7 +213,7 @@
+@@ -233,7 +233,7 @@
+ for i in ${initrd}; do
+ initrd_display="${initrd_display} ${dirname}/${i}"
+ done
+- gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
++ gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&3
fi
- if test -n "${initrd}" ; then
-- gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
-+ gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&3
- elif test -z "${initramfs}" ; then
- # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
- # no initrd or builtin initramfs, it can't work here.
+ config=
diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_netbsd.in grub-2.02~beta2/util/grub.d/10_netbsd.in
--- grub-2.02~beta2.orig/util/grub.d/10_netbsd.in 2013-12-17 18:25:57.000000000 +0100
+++ grub-2.02~beta2/util/grub.d/10_netbsd.in 2014-01-04 11:34:50.135240649 +0100
- gettext_printf "Found NetBSD kernel: %s\n" "$k" >&2
+ gettext_printf "Found NetBSD kernel: %s\n" "$k" >&3
- if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
- netbsd_entry "knetbsd" "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}"
+ # The GRUB_DISABLE_SUBMENU option used to be different than others since it was
+ # mentioned in the documentation that has to be set to 'y' instead of 'true' to
diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/10_windows.in grub-2.02~beta2/util/grub.d/10_windows.in
--- grub-2.02~beta2.orig/util/grub.d/10_windows.in 2013-12-17 18:25:57.000000000 +0100
+++ grub-2.02~beta2/util/grub.d/10_windows.in 2014-01-04 11:34:50.135240649 +0100
cat << EOF
menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
EOF
-diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/20_linux_xen.in grub-2.02~beta2/util/grub.d/20_linux_xen.in
---- grub-2.02~beta2.orig/util/grub.d/20_linux_xen.in 2014-01-04 10:50:51.000000000 +0100
-+++ grub-2.02~beta2/util/grub.d/20_linux_xen.in 2014-01-04 11:34:50.135240649 +0100
-@@ -204,7 +204,7 @@
- fi
- while [ "x$list" != "x" ] ; do
- linux=`version_find_latest $list`
+--- grub-2.04/util/grub.d/20_linux_xen.in.orig 2019-04-23 10:54:47.000000000 +0200
++++ grub-2.04/util/grub.d/20_linux_xen.in 2019-07-05 13:55:11.220267798 +0200
+@@ -243,7 +243,7 @@
+ done
+
+ for linux in ${reverse_sorted_linux_list}; do
- gettext_printf "Found linux image: %s\n" "$linux" >&2
+ gettext_printf "Found linux image: %s\n" "$linux" >&3
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
-@@ -227,7 +227,7 @@
- fi
- done
- if test -n "${initrd}" ; then
-- gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
-+ gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&3
- else
- # "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
- linux_root_device_thisversion=${GRUB_DEVICE}
+@@ -274,7 +274,7 @@
+ for i in ${initrd}; do
+ initrd_display="${initrd_display} ${dirname}/${i}"
+ done
+- gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
++ gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&3
+ fi
+
+ if test -z "${initrd_real}"; then
diff -dur -x '*~' -x '*.orig' grub-2.02~beta2.orig/util/grub.d/30_os-prober.in grub-2.02~beta2/util/grub.d/30_os-prober.in
--- grub-2.02~beta2.orig/util/grub.d/30_os-prober.in 2014-01-04 10:50:51.000000000 +0100
+++ grub-2.02~beta2/util/grub.d/30_os-prober.in 2014-01-04 11:34:50.135240649 +0100
@@ -134,7 +134,7 @@
- LONGNAME="${LABEL}"
- fi
+ # os-prober returns text string followed by optional counter
+ CLASS="--class $(echo "${LABEL}" | LC_ALL=C sed 's,[[:digit:]]*$,,' | cut -d' ' -f1 | tr 'A-Z' 'a-z' | LC_ALL=C sed 's,[^[:alnum:]_],_,g')"
- gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2
+ gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&3
case ${BOOT} in
chain)
-@@ -321,7 +321,7 @@
+@@ -329,7 +329,7 @@
+ ;;
*)
- echo -n " "
# TRANSLATORS: %s is replaced by OS name.
-- gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&2
-+ gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&3
+- gettext_printf "%s is not yet supported by grub-mkconfig.\n" " ${LONGNAME}" >&2
++ gettext_printf "%s is not yet supported by grub-mkconfig.\n" " ${LONGNAME}" >&3
;;
esac
done