Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

10.6 Server: Set the appropriate Software Update Server OS X Server
Snow Leopard only hintWith Mac OS X Server 10.5 and below, Software Update Server only had one catalog of updates -- thus, you could run a command like this one, and have it point Software Update to your server:

defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL "http://Server.local:8088/"

With Mac OS X Server 10.6, Apple has divided the catalog file into three separate catalogs: one for 10.4, one for 10.5, and one for 10.6. Each is a separate URL, and if you set the wrong catalog for the OS, you'll get the (incorrect) message that your software is already up-to-date. Having three separate scripts is a hassle, though, and is prone to error.

On the Hints Forums, users tw and Hal Itosis were instrumental in crafting this AppleScript. It checks the OS that you're currently running, and sets the appropriate Software Update Server URL. Change Server.local to your server's address.

Bonus hint! Here are a couple of AppleScripts for checking which server is currently set, as well as setting the server back to the default (Apple's). First, to check the current server, use this AppleScript:

set SUServer to do shell script "defaults read /Library/Preferences/com.apple.SoftwareUpdate CatalogURL" display dialog SUServer

And use this AppleScript to reset the Software Update Server:

do shell script "defaults delete /Library/Preferences/com.apple.SoftwareUpdate CatalogURL"

Save them as applications, and you can quickly launch them from a flash drive or a network share.

I should note that I realize Workgroup Manager is the official way of pushing the Software Update Server. I work at a Mac repair shop, though, and binding to a directory is not only way overkill for our needs, but introduces all kinds of complications. This is a quick way to update someone's machine without having to download each update via Apple's servers, or install each package manually.

Hope this helps someone!

[robg adds: I haven't tested this one.]
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[2,714 views]  

10.6 Server: Set the appropriate Software Update Server | 4 comments | Create New Account
Click here to return to the '10.6 Server: Set the appropriate Software Update Server' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
10.6 Server: Set the appropriate Software Update Server
Authored by: jcbeckman on Wed, Oct 21 2009 at 8:34AM PDT
The different catalogs are listed in the manual for Software Update, as well as the commands for setting the catalog via the terminal in unmanaged clients. Lots of good info in that manual.

[ Reply to This | # ]
10.6 Server: Set the appropriate Software Update Server
Authored by: flammable on Fri, Oct 23 2009 at 12:27AM PDT
True, the commands and URLs are in the manual. You're missing the point of the hint if you think that's adequate, though.

The strength of this hint is the AppleScript. It allows you to run the same script on all types of machines, without first needing to check which OS version you're running. There is no error message if you choose the wrong catalog, so having three separate scripts can be problematic.

[ Reply to This | # ]
10.6 Server: Set the appropriate Software Update Server
Authored by: feyd on Mon, Nov 9 2009 at 10:07AM PST
Awesome hint. I actually tried deploying this using Casper by JAMF. Every once in a while it would fail and the log stated that there was a missing ">" somewhere. Obviously there are no brackets in your script. To avoid the issue I rewrote it as a bash script.
#!/bin/bash

#script ported from AppleScript to shell by feyd
#original by flammable found here http://www.macosxhints.com/article.php?story=20091002190708159

osVersion=`sw_vers -productVersion`

case $osVersion in
10.4*)
	catalogURLValue="http://Server.local:8088/index.sucatalog"
	;;
10.5*)
	catalogURLValue="http://Server.local:8088/index-leopard.merged-1.sucatalog"
	;;
10.6*)
	catalogURLValue="http://Server.local:8088/index-leopard-snowleopard.merged-1.sucatalog"
	;;
10.[1-3]*)
	exit 1
	;;
esac

defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL $catalogURLValue

exit 0
Thanks again!

[ Reply to This | # ]
10.6 Server: Set the appropriate Software Update Server
Authored by: yogiberra on Fri, Nov 13 2009 at 1:46AM PST
Hi,

I'm a complete Applescript newbie and I can't get this script (the one that checks the server) to work.
Get the following error message in Applescript:

error "dyld: shared cached file was build against a different libSystem.dylib, ignoring cache
dyld: shared cached file was build against a different libSystem.dylib, ignoring cache
2009-11-13 10:40:06.733 defaults[349:60f]
The domain/default pair of (com.apple.SoftwareUpdate, CatalogURL) does not exist" number 1

What do I do wrong?
First I just tried to copy and paste the string but it wouldn't compile, then i put "display dialog SUServer" on a different line and got the above error message.
I'm running 10.6.2.

Cheers
Bjorn

[ Reply to This | # ]