Fix Armbian version detection

This commit is contained in:
Jai A P 2021-08-27 13:40:03 +05:30 committed by GitHub
parent 0e0613588e
commit f04bca3045
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1009,12 +1009,21 @@ get_distro() {
esac
elif type -p twistver >/dev/null; then
. /etc/os-release
case $distro_shorthand in
on) distro="$( twistver ) (${NAME} ${VERSION_ID})" ;;
tiny) distro="$( twistver ) (${NAME})" ;;
off) distro="$( twistver ) (${PRETTY_NAME}})" ;;
esac
if [[ -f /etc/armbian-release ]]; then
. /etc/armbian-release
case $distro_shorthand in
on) distro="$( twistver ) (Armbian ${VERSION})" ;;
tiny) distro="$( twistver ) (Armbian)" ;;
off) distro="$( twistver ) (Armbian ${VERSION} ${DISTRIBUTION_CODENAME})" ;;
esac
else
. /etc/os-release
case $distro_shorthand in
on) distro="$( twistver ) (${NAME} ${VERSION_ID})" ;;
tiny) distro="$( twistver ) (${NAME})" ;;
off) distro="$( twistver ) (${PRETTY_NAME}})" ;;
esac
fi
elif type -p lsb_release >/dev/null; then
case $distro_shorthand in