Просмотр исходного кода

lsb_release command now detected

changed so lsb_release command is detected rather than the
/etc/lsb-release file
Daniel Gibbs 11 лет назад
Родитель
Сommit
b9725724b0
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      functions/fn_details_distro

+ 2 - 2
functions/fn_details_distro

@@ -2,7 +2,7 @@
 # LGSM fn_details_distro function
 # LGSM fn_details_distro function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://danielgibbs.co.uk
 # Website: http://danielgibbs.co.uk
-# Version: 260115
+# Version: 120215
 
 
 # Description: Variables providing useful info on the Operating System such as disk and performace info.
 # Description: Variables providing useful info on the Operating System such as disk and performace info.
 # Used for fn_details, fn_debug and fn_email.
 # Used for fn_details, fn_debug and fn_email.
@@ -11,7 +11,7 @@
 # Returns architecture, kernel and distro/os.
 # Returns architecture, kernel and distro/os.
 arch=$(uname -m)
 arch=$(uname -m)
 kernel=$(uname -r)
 kernel=$(uname -r)
-if [ -f /etc/lsb-release ]; then
+if [ -z $(command -v lsb_release) ]; then
 	os=$(lsb_release -s -d)
 	os=$(lsb_release -s -d)
 elif [ -f /etc/debian_version ]; then
 elif [ -f /etc/debian_version ]; then
 	os="Debian $(cat /etc/debian_version)"
 	os="Debian $(cat /etc/debian_version)"