Annotation of /trunk/grub/patches/grub-2.00-10_linux-pretty-names-from-etc-os-release.patch
Parent Directory | Revision Log
Revision 2517 -
(hide annotations)
(download)
Wed Nov 5 10:51:08 2014 UTC (9 years, 10 months ago) by niro
File size: 701 byte(s)
Wed Nov 5 10:51:08 2014 UTC (9 years, 10 months ago) by niro
File size: 701 byte(s)
-generate pretty names from os-release if GRUB_DISTRIBUTION is not set
1 | niro | 2517 | diff -Naur grub-2.00/util/grub.d/10_linux.in grub-2.00-pretty/util/grub.d/10_linux.in |
2 | --- grub-2.00/util/grub.d/10_linux.in 2014-11-05 13:47:22.289888037 +0100 | ||
3 | +++ grub-2.00-pretty/util/grub.d/10_linux.in 2014-11-05 13:48:55.625895071 +0100 | ||
4 | @@ -29,7 +29,8 @@ | ||
5 | CLASS="--class gnu-linux --class gnu --class os" | ||
6 | |||
7 | if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then | ||
8 | - OS=GNU/Linux | ||
9 | + OS="$(eval $(grep PRETTY_NAME /etc/os-release) ; echo ${PRETTY_NAME})" | ||
10 | + CLASS="--class $(eval $(grep '^ID_LIKE=\|^ID=' /etc/os-release) ; [ -n "${ID_LIKE}" ] && echo ${ID_LIKE} || echo ${ID}) ${CLASS}" | ||
11 | else | ||
12 | OS="${GRUB_DISTRIBUTOR}" | ||
13 | CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}" |