]> TLD Linux GIT Repositories - packages/grub2.git/commitdiff
- use full distro name as title, regardless of distributor being set or not
authorMarcin Krol <hawk@tld-linux.org>
Sun, 27 Apr 2025 15:47:03 +0000 (17:47 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Sun, 27 Apr 2025 15:47:03 +0000 (17:47 +0200)
just-say-linux.patch

index 97cecbc630229a7f95df91b36700e6444baa5820..9793d33a42e33d96d13d7510f45e3b2dedc1559e 100644 (file)
@@ -1,30 +1,56 @@
-diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/10_linux.in grub-2.00.git20131218/util/grub.d/10_linux.in
---- grub-2.00.git20131218.orig/util/grub.d/10_linux.in 2013-12-18 14:41:17.000000000 +0100
-+++ grub-2.00.git20131218/util/grub.d/10_linux.in      2013-12-18 14:42:46.000000000 +0100
-@@ -54,9 +54,9 @@
+diff -ur grub-2.12.orig/util/grub.d/10_linux.in grub-2.12/util/grub.d/10_linux.in
+--- grub-2.12.orig/util/grub.d/10_linux.in     2025-04-27 17:41:45.421813711 +0200
++++ grub-2.12/util/grub.d/10_linux.in  2025-04-27 17:45:01.802391063 +0200
+@@ -28,10 +28,10 @@
  CLASS="--class gnu-linux --class gnu --class os"
  
++OS="$(eval $(grep PRETTY_NAME /etc/os-release) ; echo ${PRETTY_NAME})"
  if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
 -  OS=GNU/Linux
-+  OS="$(. /etc/os-release ; echo "$NAME $VERSION")"
++  CLASS="--class $(eval $(grep ^ID= /etc/os-release) ; echo ${ID}) ${CLASS}"
  else
 -  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
-+  OS="${GRUB_DISTRIBUTOR}"
    CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
  fi
  
-diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in grub-2.00.git20131218/util/grub.d/20_linux_xen.in
---- grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in     2013-12-18 14:41:17.000000000 +0100
-+++ grub-2.00.git20131218/util/grub.d/20_linux_xen.in  2013-12-18 14:43:11.000000000 +0100
-@@ -33,9 +33,9 @@
+@@ -94,9 +94,9 @@
+   if [ x$type != xsimple ] ; then
+       case $type in
+         recovery)
+-            title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
++            title="$(gettext_printf "%s, %s (recovery mode)" "${os}" "${version}")" ;;
+         *)
+-            title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
++            title="$(gettext_printf "%s, %s" "${os}" "${version}")" ;;
+       esac
+       if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
+         replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
+diff -ur grub-2.12.orig/util/grub.d/20_linux_xen.in grub-2.12/util/grub.d/20_linux_xen.in
+--- grub-2.12.orig/util/grub.d/20_linux_xen.in 2025-04-27 17:41:45.421813711 +0200
++++ grub-2.12/util/grub.d/20_linux_xen.in      2025-04-27 17:45:27.034466223 +0200
+@@ -28,10 +28,10 @@
  CLASS="--class gnu-linux --class gnu --class os --class xen"
  
++OS="$(eval $(grep PRETTY_NAME /etc/os-release) ; echo ${PRETTY_NAME})"
  if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
 -  OS=GNU/Linux
-+  OS="$(. /etc/os-release ; echo "$NAME $VERSION")"
++  CLASS="--class $(eval $(grep ^ID= /etc/os-release) ; echo ${ID}) ${CLASS}"
  else
 -  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
-+  OS="${GRUB_DISTRIBUTOR}"
    CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
  fi
  
+@@ -120,9 +120,9 @@
+   fi
+   if [ x$type != xsimple ] ; then
+       if [ x$type = xrecovery ] ; then
+-        title="$(gettext_printf "%s, with Xen %s and Linux %s (recovery mode)" "${os}" "${entry_xen_version}" "${version}")"
++        title="$(gettext_printf "%s, %s, Xen %s (recovery mode)" "${os}" "${version}" "${entry_xen_version}")"
+       else
+-        title="$(gettext_printf "%s, with Xen %s and Linux %s" "${os}" "${entry_xen_version}" "${version}")"
++        title="$(gettext_printf "%s, %s, Xen %s" "${os}" "${version}" "${entry_xen_version}")"
+       fi
+       replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
+       if [ x"Xen ${entry_xen_version}>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then