blacki2 Posted March 10, 2022 Posted March 10, 2022 Hi, since I upgraded my debian-based Armbian installations from 21.08.x to 22.02.1 the DISTRIBUTION_CODENAME variable is empty in the MOTD. It seems this error is in file https://github.com/armbian/build/blob/master/packages/bsp/common/etc/update-motd.d/10-armbian-header since commit https://github.com/armbian/build/pull/3378/commits/1c71761973858c2bea16074075ef74157c2a960b. It tries to read the DISTRIBUTION_CODENAME from /etc/lsb-release, which is non-existent on debian-based Armbian. So I propose to read the variable from /etc/os-release instead, which is existent on Ubuntu AND Debian: --- /etc/update-motd.d/10-armbian-header.old 2022-01-11 20:04:18.000000000 +0100 +++ /etc/update-motd.d/10-armbian-header 2022-03-10 23:57:46.516373135 +0100 @@ -14,7 +14,7 @@ [[ -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 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 regards, Chris
Solution blacki2 Posted April 1, 2022 Author Solution Posted April 1, 2022 Opened PR for this change: https://github.com/armbian/build/pull/3619 regards, Chris 1
Recommended Posts