Fix MOTD in debian-based armbian (#3619)

* Fix MOTD in debian-based armbian

Read DISTRIBUTION_CODENAME for MOTD from os-release instead of lsb-release

* Revert "Merge branch 'armbian:master' into master"

This reverts commit fa534bd685, reversing
changes made to 2791b57b90.

* Fix MOTD in debian-based armbian

Read DISTRIBUTION_CODENAME for MOTD from os-release where the file is existent.

* Revert "Revert "Merge branch 'armbian:master' into master""

This reverts commit 5e509cf787.
This commit is contained in:
bl4cki
2022-04-07 01:05:43 +02:00
committed by GitHub
parent 6097721596
commit 0a2fdc4f0b

View File

@@ -15,6 +15,7 @@ MOTD_DISABLE=""
[[ -f /etc/armbian-release ]] && . /etc/armbian-release
[[ -f /etc/armbian-distribution-status ]] && . /etc/armbian-distribution-status
[[ -f /etc/lsb-release && -f /etc/armbian-distribution-status ]] && DISTRIBUTION_CODENAME=$(cat /etc/lsb-release | grep CODENAME | cut -d"=" -f2) && DISTRIBUTION_STATUS=$(cat /etc/armbian-distribution-status | grep $DISTRIBUTION_CODENAME | cut -d"=" -f2)
[[ -f /etc/os-release && -f /etc/armbian-distribution-status ]] && DISTRIBUTION_CODENAME=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d"=" -f2) && DISTRIBUTION_STATUS=$(cat /etc/armbian-distribution-status | grep $DISTRIBUTION_CODENAME | cut -d"=" -f2)
[[ -f /etc/default/armbian-motd ]] && . /etc/default/armbian-motd
for f in $MOTD_DISABLE; do