File: mkconfig-distributor.patch

package info (click to toggle)
grub2 2.14~git20250718.0e36779-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 60,688 kB
  • sloc: ansic: 541,811; asm: 68,074; sh: 9,803; cpp: 2,095; makefile: 1,895; python: 1,518; sed: 446; lex: 393; yacc: 268; awk: 85; lisp: 54; perl: 31
file content (38 lines) | stat: -rw-r--r-- 1,186 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: Mario Limonciello <Mario_Limonciello@dell.com>
Date: Mon, 13 Jan 2014 12:13:14 +0000
Subject: Don't add suffix to the distributor string

- Ubuntu is called "Ubuntu", not "Ubuntu GNU/Linux"
- Debian already has the suffix in `/etc/os-release`

Author: Colin Watson <cjwatson@debian.org>
Author: Harald Sitter <apachelogger@kubuntu.org>
Author: Mate Kukri <mate.kukri@canonical.com>
Forwarded: not-needed
Last-Update: 2024-11-05

Patch-Name: mkconfig-distributor.patch
---
 util/grub.d/10_linux.in | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index ec362d7..19a2251 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -32,7 +32,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
+    Ubuntu|*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