Set usermotd name/version fallbacks

This commit is contained in:
Anthony Rose 2023-02-15 15:31:13 +00:00
parent bb57f55a8c
commit b481966adc

View file

@ -316,7 +316,7 @@ usermotd () {
# Distro name and version on Linux and macOS.
if [ -r /etc/os-release ]
then
echo " $(. /etc/os-release; echo "$NAME" "$VERSION")"
echo " $(. /etc/os-release; echo "${PRETTY_NAME:-${NAME:-${ID:-unknown}} ${VERSION:-${VERSION_ID:-??}}}")"
fi
if [ "$(uname -s)" = "Darwin" ]
then