Posted on 12-01-2017 01:59 PM
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
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
Posted on 12-01-2017 02:06 PM
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.
Posted on 12-01-2017 02:17 PM
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>"
Posted on 12-05-2017 07:58 AM
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