* Don't use lsb_release if it's a ReadyNAS compile.

This commit is contained in:
Justin Maggard 2009-05-11 00:28:10 +00:00
parent bdf2c86075
commit 81a5517060

View File

@ -115,13 +115,20 @@ case $OS_NAME in
OS_NAME=Debian OS_NAME=Debian
OS_VERSION=`cat /etc/debian_version` OS_VERSION=`cat /etc/debian_version`
OS_URL=http://www.debian.org/ OS_URL=http://www.debian.org/
fi
# use lsb_release (Linux Standard Base) when available # use lsb_release (Linux Standard Base) when available
LSB_RELEASE=`which lsb_release 2>/dev/null` LSB_RELEASE=`which lsb_release 2>/dev/null`
if [ 0 -eq $? ]; then if [ 0 -eq $? ]; then
OS_NAME=`${LSB_RELEASE} -i -s` OS_NAME=`${LSB_RELEASE} -i -s`
OS_VERSION=`${LSB_RELEASE} -r -s` OS_VERSION=`${LSB_RELEASE} -r -s`
fi fi
else
# use lsb_release (Linux Standard Base) when available
LSB_RELEASE=`which lsb_release 2>/dev/null`
if [ 0 -eq $? ]; then
OS_NAME=`${LSB_RELEASE} -i -s`
OS_VERSION=`${LSB_RELEASE} -r -s`
fi
fi
;; ;;
*) *)
echo "Unknown OS : $OS_NAME" echo "Unknown OS : $OS_NAME"