Commit cdc6d5b4 authored by Dylan Araps's avatar Dylan Araps Committed by GitHub

Merge pull request #490 from dylanaraps/lsb-release2

Distro: Add back lsb_release detection
parents 4e6793d1 c8d5044e
......@@ -83,7 +83,16 @@ get_distro() {
source "$file" && break
done
# The 3rd line down matches the fold marker syntax. {{{
# If the os-release file identifies the system as "Ubuntu"
# we then use /etc/lsb-release to get the distro information.
# This is required since Linux Mint and other distros
# aren't using the os-release file correctly.
if [[ "$NAME" =~ "Ubuntu" ]]; then
source /etc/lsb-release
unset NAME VERSION_ID PRETTY_NAME UBUNTU_CODENAME
fi
# Format the distro name.
case "$distro_shorthand" in
"on") distro="${NAME:-${DISTRIB_ID}} ${VERSION_ID:-${DISTRIB_RELEASE}}" ;;
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment