Skip to content

Commit c059c97

Browse files
committed
Improved distro detection
1 parent 48e0bff commit c059c97

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/common/system-info.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,8 @@ if [ -f "${ROOT_ETC}/rpi-issue" ]; then
610610
OS='Raspberry Pi OS'
611611
DISTRO='Raspberry Pi OS'
612612
elif [ -f "${ROOT_ETC}/os-release" ]; then
613-
OS=$(grep "^NAME" "${ROOT_ETC}/os-release" | tail -n 1 | awk -F'=' '{print $2}' | sed 's/\"//g')
613+
OS=$(grep "^PRETTY_NAME" "${ROOT_ETC}/os-release" | tail -n 1 | awk -F'=' '{print $2}' | sed 's/\"//g')
614+
[ -z "${OS}" ] && OS=$(grep "^NAME" "${ROOT_ETC}/os-release" | tail -n 1 | awk -F'=' '{print $2}' | sed 's/\"//g')
614615
DISTRO=$(grep "^ID" "${ROOT_ETC}/os-release" | tail -n 1 | awk -F'=' '{print $2}' | sed 's/\"//g')
615616
else
616617
DISTRO=$(echo "${KERNEL_VERSION}" | sed \

0 commit comments

Comments
 (0)