Jump to content

MOTD DISTRIBUTION_CODENAME empty in debian-based Armbian 22.02.1


Go to solution Solved by blacki2,

Recommended Posts

Posted

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines