Help with an Extension Attribute to show the version of Mcafee Management for Native encryption.

rdagel
New Contributor II

I need an extension attribute to show me if version 4.1.2 of Mcafee Native Encryption is installed. I created this script, but when it is run in the JSS even if 4.1.2 is installed, it still shows the result of Not Latest

!/bin/sh

McAfeeMNEversion='/usr/local/mcafee/mne/bin/MNEMacTool -v'

if [[ $McAfeeMNEversion == "McAfee Management for Native Encryption Version: 4.1.2" ]]; then echo "<result>4.1.2</result>"
else echo "<result>Not Latest</result>"
fi

3 REPLIES 3

emily
Valued Contributor III
Valued Contributor III

I don't have that tool on a machine to test, but if you're able to grab the version with a simple one-liner why not just have it display the version rather than an if/else, then have it display as an integer for the EA. You can then create smart groups that look for less than that version.

jason_bracy
Contributor III

Here is my EA to report the version of MNE installed:

#!/bin/sh

result=`cat /etc/cma.d/MNEOSX__4000/config.xml | egrep "<Version>.*</Version>" | sed -e "s/<Version>(.*)</Version>/1/"|tr "|" " "`

echo "<result>${result}</result>"

sanyal
New Contributor

This should work for you !

#!/bin/sh McAfeeMNEversion=$(/usr/local/mcafee/mne/bin/MNEMacTool -v) if [[ $McAfeeMNEversion == "McAfee Management for Native Encryption Version: 4.1.2" ]]; then echo "<result>4.1.2</result>" else echo "<result>Not Latest</result>" fi