Update motd/00-header to use os-release

Bug #2008088 reported by Corentin Noël
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
base-files (Ubuntu)
New
Undecided
Unassigned

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)"
```

Corentin Noël (tintou)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.