From a3a2c5c2bf2b99aa864f0221508762340a9edf7c Mon Sep 17 00:00:00 2001 From: Zack T Date: Wed, 10 Jan 2018 14:56:14 -0700 Subject: [PATCH] v1.2.1 = Fixed issue improperly processing 10.10.x OS version strings. + Fixed issue improperly processing 10.10.x OS version strings. --- Jamf Pro/Extension Attributes/jamf_ea_LatestOSSupported.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jamf Pro/Extension Attributes/jamf_ea_LatestOSSupported.sh b/Jamf Pro/Extension Attributes/jamf_ea_LatestOSSupported.sh index 7b1d0fd..b4bd52b 100644 --- a/Jamf Pro/Extension Attributes/jamf_ea_LatestOSSupported.sh +++ b/Jamf Pro/Extension Attributes/jamf_ea_LatestOSSupported.sh @@ -3,7 +3,7 @@ ################################################################################################### # Script Name: jamf_ea_LatestOSSupported.sh # By: Zack Thompson / Created: 9/26/2017 -# Version: 1.2 / Updated: 11/13/2017 / By: ZT +# Version: 1.2.1 / Updated: 1/10/2018 / By: ZT # # Description: A Jamf Extension Attribute to check the latest compatible version of macOS. # @@ -44,7 +44,7 @@ function modelCheck { # Get machine info # Get the OS Version - osVersion=$(sw_vers -productVersion | /usr/bin/awk -F '10.' '{print $2}') + osVersion=$(sw_vers -productVersion | /usr/bin/awk -F '.' '{print $2"."$3}') # Get the Model Type and Major Version modelType=$(/usr/sbin/sysctl -n hw.model | /usr/bin/sed 's/[^a-zA-Z]//g') modelMajorVersion=$(/usr/sbin/sysctl -n hw.model | /usr/bin/sed 's/[^0-9,]//g' | /usr/bin/awk -F, '{print $1}')