123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- From b9c335f8a95094e5fd31a90a0f67613c0081e604 Mon Sep 17 00:00:00 2001
- From: Luke Shumaker <lukeshu@parabola.nu>
- Date: Wed, 25 May 2016 12:23:40 -0400
- Subject: [PATCH 2/7] FSDG: os-release: Default PRETTY_NAME to "GNU/Linux"
- instead of "Linux"
- ---
- man/check-os-release-simple.py | 2 +-
- man/check-os-release.py | 2 +-
- man/check-os-release.sh | 2 +-
- man/kernel-install.xml | 4 ++--
- man/os-release.xml | 2 +-
- src/basic/os-util.c | 2 +-
- src/kernel-install/90-loaderentry.install.in | 2 +-
- 7 files changed, 8 insertions(+), 8 deletions(-)
- diff --git a/man/check-os-release-simple.py b/man/check-os-release-simple.py
- index ce73c77b14..9ad899a814 100644
- --- a/man/check-os-release-simple.py
- +++ b/man/check-os-release-simple.py
- @@ -4,7 +4,7 @@
- import platform
- os_release = platform.freedesktop_os_release()
-
- -pretty_name = os_release.get('PRETTY_NAME', 'Linux')
- +pretty_name = os_release.get('PRETTY_NAME', 'GNU/Linux')
- print(f'Running on {pretty_name!r}')
-
- if 'fedora' in [os_release.get('ID', 'linux'),
- diff --git a/man/check-os-release.py b/man/check-os-release.py
- index 19b193ec76..373b77ed06 100644
- --- a/man/check-os-release.py
- +++ b/man/check-os-release.py
- @@ -29,7 +29,7 @@ def read_os_release():
-
- os_release = dict(read_os_release())
-
- -pretty_name = os_release.get('PRETTY_NAME', 'Linux')
- +pretty_name = os_release.get('PRETTY_NAME', 'GNU/Linux')
- print(f'Running on {pretty_name!r}')
-
- if 'debian' in [os_release.get('ID', 'linux'),
- diff --git a/man/check-os-release.sh b/man/check-os-release.sh
- index 12f7ee12cc..084647a38b 100644
- --- a/man/check-os-release.sh
- +++ b/man/check-os-release.sh
- @@ -4,7 +4,7 @@
- test -e /etc/os-release && os_release='/etc/os-release' || os_release='/usr/lib/os-release'
- . "${os_release}"
-
- -echo "Running on ${PRETTY_NAME:-Linux}"
- +echo "Running on ${PRETTY_NAME:-GNU/Linux}"
-
- if [ "${ID:-linux}" = "debian" ] || [ "${ID_LIKE#*debian*}" != "${ID_LIKE}" ]; then
- echo "Looks like Debian!"
- diff --git a/man/kernel-install.xml b/man/kernel-install.xml
- index f3468bbde0..163e233489 100644
- --- a/man/kernel-install.xml
- +++ b/man/kernel-install.xml
- @@ -140,7 +140,7 @@
- <filename>$BOOT/loader/entries/<replaceable>ENTRY-TOKEN</replaceable>-<replaceable>KERNEL-VERSION</replaceable>.conf</filename>.
- The title of the entry is the <replaceable>PRETTY_NAME</replaceable> parameter specified in
- <filename>/etc/os-release</filename> or <filename>/usr/lib/os-release</filename> (if the former
- - is missing), or "Linux <replaceable>KERNEL-VERSION</replaceable>", if unset.</para>
- + is missing), or "GNU/Linux <replaceable>KERNEL-VERSION</replaceable>", if unset.</para>
-
- <para>If <varname>$KERNEL_INSTALL_LAYOUT</varname> is not "bls", this plugin does nothing.</para></listitem>
-
- @@ -640,7 +640,7 @@
- <listitem>
- <para>Read by <filename>90-loaderentry.install</filename>. If available,
- <varname>PRETTY_NAME=</varname> is read from these files and used as the title of the boot menu
- - entry. Otherwise, <literal>Linux <replaceable>KERNEL-VERSION</replaceable></literal> will be
- + entry. Otherwise, <literal>GNU/Linux <replaceable>KERNEL-VERSION</replaceable></literal> will be
- used.</para>
-
- <xi:include href="version-info.xml" xpointer="v198"/>
- diff --git a/man/os-release.xml b/man/os-release.xml
- index afdb21fc57..a1f0bbb9f4 100644
- --- a/man/os-release.xml
- +++ b/man/os-release.xml
- @@ -190,7 +190,7 @@
-
- <listitem><para>A pretty operating system name in a format suitable for presentation to the
- user. May or may not contain a release code name or OS version of some kind, as suitable. If not
- - set, a default of <literal>PRETTY_NAME="Linux"</literal> may be used</para>
- + set, a default of <literal>PRETTY_NAME="GNU/Linux"</literal> may be used</para>
-
- <para>Example: <literal>PRETTY_NAME="Fedora 17 (Beefy Miracle)"</literal>.</para></listitem>
- </varlistentry>
- diff --git a/src/basic/os-util.c b/src/basic/os-util.c
- index 79f641b364..efbb08c985 100644
- --- a/src/basic/os-util.c
- +++ b/src/basic/os-util.c
- @@ -476,5 +476,5 @@ const char *os_release_pretty_name(const char *pretty_name, const char *name) {
- * exists mostly to ensure we use the same logic wherever possible. */
-
- return empty_to_null(pretty_name) ?:
- - empty_to_null(name) ?: "Linux";
- + empty_to_null(name) ?: "GNU/Linux";
- }
- diff --git a/src/kernel-install/90-loaderentry.install.in b/src/kernel-install/90-loaderentry.install.in
- index 766d321595..56775e63d0 100755
- --- a/src/kernel-install/90-loaderentry.install.in
- +++ b/src/kernel-install/90-loaderentry.install.in
- @@ -66,7 +66,7 @@ elif [ -f /usr/lib/os-release ]; then
- . /usr/lib/os-release
- fi
-
- -[ -n "$PRETTY_NAME" ] || PRETTY_NAME="Linux $KERNEL_VERSION"
- +[ -n "$PRETTY_NAME" ] || PRETTY_NAME="GNU/Linux $KERNEL_VERSION"
-
- SORT_KEY="$IMAGE_ID"
- [ -z "$SORT_KEY" ] && SORT_KEY="$ID"
- --
- 2.45.2
|