Browse Source

Added os-release as an option for distroname

pull/981/head
Daniel Gibbs 9 years ago
parent
commit
0c471b91f0
  1. 2
      lgsm/functions/info_distro.sh

2
lgsm/functions/info_distro.sh

@ -15,6 +15,8 @@ arch=$(uname -m)
kernel=$(uname -r) kernel=$(uname -r)
if [ -n "$(command -v lsb_release)" ]; then if [ -n "$(command -v lsb_release)" ]; then
distroname=$(lsb_release -s -d) distroname=$(lsb_release -s -d)
elif [ -f "/etc/os-release" ]; then
distroname=$(grep PRETTY_NAME /etc/os-release | sed 's/PRETTY_NAME=//g' | tr -d '="')
elif [ -f "/etc/debian_version" ]; then elif [ -f "/etc/debian_version" ]; then
distroname="Debian $(cat /etc/debian_version)" distroname="Debian $(cat /etc/debian_version)"
elif [ -f "/etc/redhat-release" ]; then elif [ -f "/etc/redhat-release" ]; then

Loading…
Cancel
Save