[Bug 2008088] [NEW] Update motd/00-header to use os-release
Corentin Noël
2008088 at bugs.launchpad.net
Wed Feb 22 13:27:18 UTC 2023
Public bug reported:
The now recommended way to specify an OS version is in /usr/lib/os-release that is shipped with Ubuntu since a while now.
The lsb-release utility has now long switched to using os-release files https://salsa.debian.org/debian/lsb/-/commit/b05d8b6b70e5af820ddb4e651868488ed9257c17
It would be better for the motd header to look like this:
```
[ -r /usr/lib/os-release ] && . /usr/lib/os-release
if [ -z "$PRETTY_NAME" ] && [ -x /usr/bin/lsb_release ]; then
# Fall back to using the very slow lsb_release utility
PRETTY_NAME=$(lsb_release -s -d)
fi
printf "Welcome to %s (%s %s %s)\n" "$PRETTY_NAME" "$(uname -o)" "$(uname -r)" "$(uname -m)"
```
** Affects: base-files (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
The now recommended way to specify an OS version is in /usr/lib/os-release that is shipped with Ubuntu since a while now.
The lsb-release utility has now long switched to using os-release files https://salsa.debian.org/debian/lsb/-/commit/b05d8b6b70e5af820ddb4e651868488ed9257c17
It would be better for the motd header to look like this:
```
- [ -r /usr/bin/os-release ] && . /usr/bin/os-release
+ [ -r /usr/lib/os-release ] && . /usr/lib/os-release
if [ -z "$PRETTY_NAME" ] && [ -x /usr/bin/lsb_release ]; then
- # Fall back to using the very slow lsb_release utility
- PRETTY_NAME=$(lsb_release -s -d)
+ # Fall back to using the very slow lsb_release utility
+ PRETTY_NAME=$(lsb_release -s -d)
fi
printf "Welcome to %s (%s %s %s)\n" "$PRETTY_NAME" "$(uname -o)" "$(uname -r)" "$(uname -m)"
```
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to base-files in Ubuntu.
https://bugs.launchpad.net/bugs/2008088
Title:
Update motd/00-header to use os-release
Status in base-files package in Ubuntu:
New
Bug description:
The now recommended way to specify an OS version is in /usr/lib/os-release that is shipped with Ubuntu since a while now.
The lsb-release utility has now long switched to using os-release files https://salsa.debian.org/debian/lsb/-/commit/b05d8b6b70e5af820ddb4e651868488ed9257c17
It would be better for the motd header to look like this:
```
[ -r /usr/lib/os-release ] && . /usr/lib/os-release
if [ -z "$PRETTY_NAME" ] && [ -x /usr/bin/lsb_release ]; then
# Fall back to using the very slow lsb_release utility
PRETTY_NAME=$(lsb_release -s -d)
fi
printf "Welcome to %s (%s %s %s)\n" "$PRETTY_NAME" "$(uname -o)" "$(uname -r)" "$(uname -m)"
```
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/2008088/+subscriptions
More information about the foundations-bugs
mailing list