|
|
@@ -2,7 +2,7 @@
|
|
|
# LGSM fn_details_distro function
|
|
|
# Author: Daniel Gibbs
|
|
|
# Website: http://danielgibbs.co.uk
|
|
|
-# Version: 120215
|
|
|
+# Version: 140215
|
|
|
|
|
|
# Description: Variables providing useful info on the Operating System such as disk and performace info.
|
|
|
# Used for fn_details, fn_debug and fn_email.
|
|
|
@@ -11,7 +11,7 @@
|
|
|
# Returns architecture, kernel and distro/os.
|
|
|
arch=$(uname -m)
|
|
|
kernel=$(uname -r)
|
|
|
-if [ -z $(command -v lsb_release) ]; then
|
|
|
+if [ -n "$(command -v lsb_release)" ]; then
|
|
|
os=$(lsb_release -s -d)
|
|
|
elif [ -f /etc/debian_version ]; then
|
|
|
os="Debian $(cat /etc/debian_version)"
|
|
|
@@ -27,7 +27,7 @@ glibcv=$(ldd --version |grep ldd|awk '{print $NF}')
|
|
|
|
|
|
# tmux version
|
|
|
# e.g: tmux 1.6
|
|
|
-if [ -z $(command -v tmux) ]; then
|
|
|
+if [ -z "$(command -v tmux)" ]; then
|
|
|
tmuxv="\e[0;31mNOT INSTALLED!\e[0m"
|
|
|
elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd [:digit:]|tail -c 3)" -lt "16" ]; then
|
|
|
tmuxv="$(tmux -V) (>= 1.6 required for console log)"
|