quick and dirty method here.
bash-3.2# softwareupdate -l
Software Update Tool
Copyright 2002-2009 Apple
Software Update found the following new or updated software:
* iTunesXPatch-10.5.1
iTunes (10.5.1), 26904K [recommended]
* iWork0905-9.1
iWork Update 6 (9.1), 88100K [recommended]
* JavaForMacOSX10.6-6.0
Java for Mac OS X 10.6 Update 6 (6.0), 77344K [recommended]
* Safari5.1.2SnowLeopard-5.1.2
Safari (5.1.2), 48042K [recommended] [restart]
So taking into account there is an update that says I need a restart I can do this:
bash-3.2# softwareupdate -l | grep restart
Safari (5.1.2), 48042K [recommended] [restart]
Now if I run this command echo "$?" it will tell me if my previous command was successful or not by returning 0 for success 1 for failure.
So, a script like this could be invoked with two sets of software update policies. The first policy in the JSS will be manual trigger and force a reboot, the second policy will also be manual trigger and not enforce a reboot. So, something like this to tie it all together. Create a policy that runs this script, determines if a reboot is required then executes policy if need be.
Example code, use at own risk, make sure you test it, etc etc etc
#!/bin/bash
#check for software updates
/usr/sbin/softwareupdate -l | /usr/bin/grep -i "restart"
if [[ `/bin/echo "$?"` == 0 ]] #if it was successful
then /usr/sbin/jamf policy -trigger swureboot
else /usr/sbin/jamf policy -trigger swunoreboot
fi
exit 0
You could even put this on self service and add a jamfhelper to notify the user or what not. This is just a rough idea.