From ea88806b38f93b082a8bfea94e618afa35cc42a5 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 25 Aug 2021 20:53:18 +0100 Subject: [PATCH] distro detection bug --- lgsm/functions/info_distro.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index c9c2f0ef2..8f4185e32 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -30,7 +30,7 @@ for distro_info in "${distro_info_array[@]}"; do if [ -f "/etc/os-release" ]&&[ "${distro_info}" == "os-release" ]; then distroname=$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}') distroversion=$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}') - distroid=$(grep "ID=" /etc/os-release | grep -v VERSION | awk -F\= '{gsub(/"/,"",$2);print $2}') + distroid=$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}') distrocodename=$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}') elif [ "$(command -v lsb_release 2>/dev/null)" ]&&[ "${distro_info}" == "lsb_release" ]; then if [ -z "${distroname}" ];then