Posted on 05-10-2012 07:52 AM
I created an extension attribute called EcoreVersion that I"ve been populating. But what I'd like to be to do is update the attribute via script and policy. So when we release a new update I can update the extension. That way I can create a smart group to check those who haven't gotten the update yet.
Any suggestions?
Posted on 05-10-2012 07:56 AM
This is certainly possible.
What is it that EcoreVersion is the value of? Or what are you tracking?
Posted on 05-10-2012 08:02 AM
You can just update the attribute through the web interface and the next time the laptop gets reconed it will get the updated attribute. Then all you would have to do is change the specifications of your smart group for the latest version number and your good to go
Unless there is something more to this that I am missing
Have a good one!
Posted on 05-10-2012 08:27 PM
Well the question is - how will it get updated in the next recon?
So I have the ecoreVersion currently set at 0.06. The next update number is 0.08. So I want to run the update and have it update the attribute to 0.08 automaticlly. I don't see any way (besides me manually entering it to do that.
The one way I was thinking was to write a script that would echo the version number and use the scripting function to capture it. But if there is a better way to do it, I'll try it first.
Posted on 05-10-2012 08:53 PM
I think you are on the right track with your idea. In my opinion, it is the best way to go. Just make sure to use the <result></result> tags in your echo and that is what will populate the extension attribute.
Example, if your script sets a variable of the version number, the line to populate the script might look something like this:
echo "<result>$version</result>"
Posted on 05-10-2012 09:23 PM
Just had a thought, is this an app that you are tracking? There are some easier ways if that is the case.
Posted on 05-10-2012 09:29 PM
If it is an app and you want to do an extension attribute, you could do something like what I have here. I threw this together quite hastily, so please do not judge.
#!/bin/sh system_profiler SPApplicationsDataType > /private/tmp/applist version=egrep VLC: -A 2 /private/tmp/applist
result=echo $version
echo "<result>$result</result>" rm /private/tmp/applist
In my example, I am checking for the version of VLC and it is returning the result as "VLC: Version: 1.1.12". It isn't the prettiest, but it does the trick. All you would have to do is change out "VLC:" with "applicationname:" and it will do the same for you.
In any event, maybe that will help, maybe it won't. I am sure there is something more elegant and possibly bit more obvious than this, but it is what came to mind. Baseball game is dragging so I thought I would give this a shot.
Good Luck!
Posted on 05-11-2012 04:02 AM
Not it's not an app, just a company image version number. If it was an app this would be a lot easier. But since people tend to update themselves in some aspects (like java), its tought to create a smart group to find all the people who need the updates. So I'm looking at the future at how I can make this easier on myself.
Posted on 05-11-2012 06:18 AM
Is the Extension Attribute something manually populated or by a script? From your description it sounds like its done from the manual drop down menu variety. If so, those are a bit tougher to update on any automated basis.
If its an image version number, consider dropping a small file somewhere hidden on the systems at imaging time and then using an Extension Attribute to read back that file name or contents to get the version build. That way for each new build you create, you just need to update the file that gets dropped on the system. If the file name is the same, but the contents are updated, the script will pull that in to your EA.
As for tracking updates needed, there are better ways in most cases to do that, although, EA's can often be used here as well. For example, we have EAs that grab the current Java vernon on the Macs, or the current Flash Player plug-in version, just as a few examples. All are done by scripts, which run at each recon, so its always up to date as long as the Mac is checking in. You can then build Smart Groups based on that info.