Rebooting with Status - this works
First, a contribution...
I've seen a couple older threads related to performing 'softwareupdate -l -a' then rebooting after. Problem is, the shutdown command doesn't exit with a status and it leaves ARD hanging....
Here is one thread:
http://discussions.apple.com/thread.jspa?messageID=4270337�
Here is one solution (I am sure there are more)...
1. Enable the 'at' command with (Send Unix Command) this to all clients (as root):
*launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist*
2. Send the softwareupdate and reboot with Send Unix Command as root (two lines):
*softwareupdate -l -a*
*echo "shutdown -r now" | at now +1 minute*
ARD won't get stuck after the update when using this method...
To expand on this, you can add an option to only update if no user is logged in:
*if who | grep console; then*
* echo Machine is in use*
* exit 1*
fi
*COMMAND LINEINSTALL=1 softwareupdate -i -a*
*echo "shutdown -r now" | at now +1 minute*
To expand further... (I haven't gotten this far yet)...
I'd like to first run "diskutil verifyVolume /" and if a problem exists exit the script without running software update.
If anyone has code they would like to contribute towards this, please post.
Thanks
Jeff
I've seen a couple older threads related to performing 'softwareupdate -l -a' then rebooting after. Problem is, the shutdown command doesn't exit with a status and it leaves ARD hanging....
Here is one thread:
http://discussions.apple.com/thread.jspa?messageID=4270337�
Here is one solution (I am sure there are more)...
1. Enable the 'at' command with (Send Unix Command) this to all clients (as root):
*launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist*
2. Send the softwareupdate and reboot with Send Unix Command as root (two lines):
*softwareupdate -l -a*
*echo "shutdown -r now" | at now +1 minute*
ARD won't get stuck after the update when using this method...
To expand on this, you can add an option to only update if no user is logged in:
*if who | grep console; then*
* echo Machine is in use*
* exit 1*
fi
*COMMAND LINEINSTALL=1 softwareupdate -i -a*
*echo "shutdown -r now" | at now +1 minute*
To expand further... (I haven't gotten this far yet)...
I'd like to first run "diskutil verifyVolume /" and if a problem exists exit the script without running software update.
If anyone has code they would like to contribute towards this, please post.
Thanks
Jeff