Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-10-15 12:27:04 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-10-15 12:27:04 +0300
commit19bfb4a7a4e29fcab3654a8fc707d06582f2244d (patch)
tree75a8337d6a39cc9c6784e7de06d8c15d81649bb9 /include/osdetection
parentfba51401507173e1b503485db5733f7452792448 (diff)
Version information for macOS
Diffstat (limited to 'include/osdetection')
-rw-r--r--include/osdetection13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/osdetection b/include/osdetection
index dfc95c68..2f551c95 100644
--- a/include/osdetection
+++ b/include/osdetection
@@ -42,16 +42,15 @@
OS="MacOS"
if [ -x /usr/bin/sw_vers ]; then
OS_NAME=$(/usr/bin/sw_vers -productName)
- if [ "${OS_NAME}" = "Mac OS X" ]; then OS_NAME="macOS"; fi
OS_VERSION=$(/usr/bin/sw_vers -productVersion)
+ OS_VERSION_NAME="unknown"
case ${OS_VERSION} in
- 10.9) OS_VERSION="Mavericks" ;;
- 10.10) OS_VERSION="Yosemite" ;;
- 10.11) OS_VERSION="El Capitan" ;;
- 10.12) OS_VERSION="Sierra" ;;
- *) echo "Unknown macOS version. Do you know what version it is? Share at ${PROGRAM_SOURCE}" ;;
+ 10.9) OS_FULLNAME="Mac OS X 10.9 (Mavericks)" ;;
+ 10.10) OS_FULLNAME="Mac OS X 10.10 (Yosemite)" ;;
+ 10.11) OS_FULLNAME="Mac OS X 10.11 (El Capitan)" ;;
+ 10.12) OS_FULLNAME="macOS 10.12 (Sierra)" ;;
+ *) echo "Unknown macOS version. Do you know what version it is? Create an issue at ${PROGRAM_SOURCE}" ;;
esac
- OS_FULLNAME="${OS_NAME} ${OS_VERSION}"
else
# Fall back to a fairly safe name
OS_NAME="macOS"