Install all Mac system updates?

(imported topic written by SystemAdmin)

Folks,

Wrote a really simply fixlet that installs all Apple system updates for clients (we don’t really care about limiting which updates get installed, rather just getting them all installed in a timely manner). Fixlet action looks like this:

Script Type sh

#!/bin/sh

softwareupdate -i -a

shutdown -r now

I want to adjust the relevance to check if there are ANY updates available via “Apple Software Update”, but not sure how to get started. Any help would be much appreciated. Thanks!

(imported comment written by SystemAdmin)

You can’t check this directly with relevance. You can do a 2-part process like this:

  1. task/fixlet: run shell script that calls softwareupdate -l > somefile.txt

  2. task/fixlet: check the contents of somefile.txt and take some action based on what you find.

(imported comment written by SystemAdmin)

First I would suggest you use the regular Actionscript and use the actionscript “restart” command so your action would look like:

wait softwareupdate -i -a

restart

This is a bit of a “softer” restart and allows the client to shut down a bit better than using the shutdown command.

As to detecting that there is anything to do that is a bit more complicated as we do not have relevance inspectors for it