Self Service Software Updates - Info?

aamjohns
Contributor II

Hi,
Is there any way to notify the users of self service when running software updates that there actually were updates, if a reboot is required, stuff like that. Actually, I'd be happy just getting some kind of feedback like what updates were installed. I believe in our environment Self Service Updates will be commonly used. We have many people who are very selective about when and what happens to their computers.

I have scripted but never shell scripting. I am assuming this would be accomplish through script.

Does anyone already have something like this or have any suggestions on how to notify users of what happened?

Thanks,
Aaron.

2 REPLIES 2

Andrina
Contributor
Contributor

I used cocoadialog for this - basically checking if the word "restart" exists when getting a "softwareupdate -l", warning the user of this and letting them decide if they want to continue or not...

#!/bin/sh
CD="/Path/On/Local/Machine/to/CocoaDialog.app/Contents/MacOS/CocoaDialog"

#Warn users that the machine will require a restart
softwareupdate -l | grep restart
if [ `echo $?` == 0 ]; then
rv=`$CD ok-msgbox --icon info --text "Some Software Updates will require a Restart." --informative-text "Some of the software updates you've requested will require a restart of your machine. Clicking OK will contiue with the updates, or click Cancel if you wish to perform these updates later." --no-newline --float`
if [ "$rv" == "1" ]; then
echo "User said OK"
softwareupdate -i -a
rv=`$CD ok-msgbox --icon info --text "Software Update Complete." --informative-text "Your software is now up to date." --no-newline --float`
elif [ "$rv" == "2" ]; then
echo "Canceling"
exit
fi
else
softwareupdate -i -a
rv=`$CD ok-msgbox --icon info --text "Software Update Complete." --informative-text "Your software is now up to date." --no-newline --float`
fi

aamjohns
Contributor II

Excellent. Thank you for sharing the code. Aaron.