Browse Source

distro detection bug

pull/3568/head
Daniel Gibbs 4 years ago
parent
commit
ea88806b38
  1. 2
      lgsm/functions/info_distro.sh

2
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

Loading…
Cancel
Save