Distro: [Linux] Also look in /usr/lib/*ease

This commit is contained in:
Dylan Araps 2016-11-01 22:47:27 +11:00
parent f8f50f6b1d
commit d45002ca15
1 changed files with 3 additions and 3 deletions

View File

@ -168,13 +168,13 @@ getdistro() {
case "$distro_shorthand" in case "$distro_shorthand" in
"on") distro="${NAME:-${DISTRIB_ID}} ${VERSION_ID:-${DISTRIB_RELEASE}}" ;; "on") distro="${NAME:-${DISTRIB_ID}} ${VERSION_ID:-${DISTRIB_RELEASE}}" ;;
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;; "tiny") distro="${NAME:-${DISTRIB_ID:-"${TAILS_PRODUCT_NAME}"}}" ;;
"off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;; "off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
esac esac
# Workarounds for distros that go against the os-release standard. # Workarounds for distros that go against the os-release standard.
[ -z "$distro" ] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/*ease)" [ -z "$distro" ] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/*ease /usr/lib/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '{print $2}' /etc/*ease)" [ -z "$distro" ] && distro="$(awk -F'=' '{print $2}' /etc/*ease /usr/lib/*ease)"
fi fi
distro="${distro//\"}" distro="${distro//\"}"
distro="${distro//\'}" distro="${distro//\'}"