Skip to main content
Question

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

  • December 1, 2017
  • 3 replies
  • 19 views

Forum|alt.badge.img+6

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

emily
Forum|alt.badge.img+26
  • Hall of Fame
  • December 1, 2017

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.


Forum|alt.badge.img+8
  • Valued Contributor
  • December 1, 2017

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>"

Forum|alt.badge.img
  • New Contributor
  • December 5, 2017

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