This commit is contained in:
Dylan Araps 2016-10-01 10:50:12 +10:00
commit 8f9b320e99
1 changed files with 3 additions and 3 deletions

View File

@ -139,18 +139,18 @@ getdistro() {
# Workarounds are included in every shorthand option
case "$distro_shorthand" in
"on")
distro="$(awk -F'=' '/^NAME|VERSION_ID=/ {print $2}' /etc/*ease)"
distro="$(awk -F'=' '/^NAME|VERSION_ID=/ {print $2; exit}' /etc/*ease /usr/lib/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '/^DISTRIB_ID|DISTRIB_RELEASE=/ {print $2}' /etc/openwrt_release)"
;;
"tiny")
distro="$(awk -F'=' '/^NAME=/ {print $2}' /etc/*ease)"
distro="$(awk -F'=' '/^NAME=/ {print $2; exit}' /etc/*ease /usr/lib/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '/^TAILS_PRODUCT_NAME=/ {print $2}' /etc/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '/^DISTRIB_ID=/ {print $2}' /etc/openwrt_release)"
;;
*)
distro="$(awk -F'=' '/^PRETTY_NAME=/ {print $2}' /etc/*ease)"
distro="$(awk -F'=' '/^PRETTY_NAME=/ {print $2; exit}' /etc/*ease /usr/lib/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '{print $2}' /etc/*ease)"
[ -z "$distro" ] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '/^DISTRIB_DESCRIPTION=/ {print $2}' /etc/openwrt_release)"