Posted on 10-02-2013 08:59 AM
I've been pushing out JAVA as updates are released.
I typically would just scope to All Computers.
However, this seems a tad messy - some newer machines go out with the newest version already on them, so it is unnecessary work on the machine.
I was going to build a Smart Group to identify the machines with older versions, but when Inventory is collected on those machines, the version number is n/a - so I am not sure how to do it.
Posted on 10-02-2013 09:02 AM
I set up the install policy to scope to all computers. Once the policy is saved, I create a static group that contains all the computers waiting to run the policy. Then, I remove all computers from the scope of the policy and add the static group I created. This way, any new computers added since the policy was created will not be in the scope.
Posted on 10-02-2013 09:11 AM
There is a bug in Oracle Java 7_25. The update mechanism shows it still as current, it's not.
Clients using the Pref Pane will think they're current with 25 unless they know 40 is out.
I have just been testing pushing the Oracle pkg as-is. Works fine. I suppose there's 20 ways to do it, this one works fine.
Posted on 10-02-2013 09:13 AM
I use extension attributes to get the version of apple and oracle javas installed, then scope my pushes to smart groups.
Apple Java version:
#!/bin/bash
#Check if java_home is defined
javaHome=`/usr/libexec/java_home 2> /dev/null`;
if [ ! -z $javaHome ]
then
vers=`java -version 2>&1 | grep "java version" | awk '{print substr($3,2,length($3)-2);}'`
echo "<result>$vers</result>"
else
echo "<result>Not Installed</result>"
fi
Oracle Java version:
#!/bin/bash
if [ -e /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java ]; then
java_version=`/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version 2>&1 | head -n 1 | cut -d" -f 2`
echo "<result>$java_version</result>"
else
echo "<result>Not Installed</result>"
fi
exit 0
Posted on 10-02-2013 09:17 AM
I've been using two extension attributes to help with this (info posted here on my blog):
Previous JAMF Nation thread: https://jamfnation.jamfsoftware.com/discussion.html?id=5790
With the information from the EAs, I'm able to build smart groups that include machines in my shop that need updated versions of Java. For example, if a machine is on 10.7.x or 10.8.x and reports Apple as the Java vendor, Casper installs the latest Oracle Java 7 update.
Posted on 10-02-2013 09:20 AM
I was reading your posts yesterday to do this more better. Thanks for that info. As I learn, I find your site up on my Mac daily. Invaluable resource. Thank you df!
Info on the bug in 1.7.0_25:
Area: install/auto_update
Synopsis: On Mac OS X update from the Java Control Panel on a system with JRE 7u25 fails to find JRE 7u40.
Mac OS X users with JRE version 7u25 installed that try to update using the Java Control Panel are told that they have the current version installed rather than being offered the option to install 7u40.
For more details see: JDK-8024640.
Posted on 10-02-2013 09:35 AM
Yikes. Too manual.
All Macs not running your preferred version of Java will run the policy and get the install. Use this model for your whole core application stack and put the system to work for you.
Edit: This post got delayed, like, a lot. It was a response to the first two.
Posted on 10-03-2013 05:08 AM
And to build on JPDyson's method, don't forget 'update inventory' as part of the policy so once installed, the machines fall out (or into) the smart group.
Posted on 10-03-2013 05:44 AM
When you create an extension attribute, does it automatically fill in after the inventory check-in. I just had to run Jamf recon -verbose to show up on a client inventory.
Thanks
Posted on 10-03-2013 06:59 AM
Almost ditto,
•EA to scope Java Version (smart group)
•.pkg directly from Oracle (in an ongoing package with recon)
•small script to disable java automatic update (We handle that for our users).