Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

improved os check to work for RH Linux 9

git-svn-id: http://shflags.googlecode.com/svn/trunk/source/1.0@100 9d7cb843-df4f-0410-8a79-4785ae5a3405
  • Loading branch information...
commit 13d24d63d6c94fec503afeffceee16c125d934b0 1 parent 8749df3
kate.ward@forestent.com authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/versions
View
10 lib/versions
@@ -51,8 +51,14 @@ versions_osVersion()
;;
Linux)
if [ -r '/etc/lsb-release' ]; then
- os_version_=`. /etc/lsb-release \
- && echo "${DISTRIB_ID}-${DISTRIB_RELEASE}"`
+ os_version_=`. /etc/lsb-release && \
+ echo "${DISTRIB_ID:-}-${DISTRIB_RELEASE:-}"`
+ fi
+ if [ "${os_version_}" = '-' ]; then
+ os_version_=''
+ if [ -r '/etc/redhat-release' ]; then
+ os_version_=`cat /etc/redhat-release`
+ fi
fi
;;
SunOS) os_version_=`echo ${os_release_} |sed 's/[0-9]*\.\([0-9]*\)/\1/'` ;;
Please sign in to comment.
Something went wrong with that request. Please try again.