grub2: fix duplicated gnulinux reference.

This commit is contained in:
Ark74 2025-04-11 23:28:08 -06:00
parent ec4f3826e4
commit a3a24c1f9f
2 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,22 @@
Prevent duplicated GNU/Linux string with Trisquel's full name.
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index cc393be7..f13c4774 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -31,7 +31,14 @@ CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ case ${GRUB_DISTRIBUTOR} in
+ "Trisquel GNU/Linux")
+ OS="${GRUB_DISTRIBUTOR}"
+ ;;
+ *)
+ OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ ;;
+ esac
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi