I am looking to create a new policy for software update to try to capture some of our laptop carts. These machines are either inaccessible or in use, so I have a hard time keeping them updated. Does anyone have a nifty way of setting it up so that only install software updates that do not require a restart are installed? It's not ideal, but it's better than never doing any updates on these machines.
Solved
Software Update only if no reboot required
Best answer by stevewood
I utilize an EA to figure out of a machine has updates that require a restart. I then scope a Smart Group off of that so I can create a policy to install those updates at any time. Machines that require a restart go into another SG and that is used by a policy that appears in Self Service for users to install the updates when they can. The policy runs Software Update from the Terminal.
EA:
#!/bin/bash
/usr/sbin/softwareupdate -l | /usr/bin/grep -i "restart"
if [[ `/bin/echo "$?"` == 0 ]] #if it was successful
then echo "<result>1</result>"
else echo "<result>0</result>"
fi
exit 0
Then the policy just has this in the Run field on the last tab:
softwareupdate -ia
Both policies use that command, just one of them is triggered by Self Service and one is set to Every15 when I enable it.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
