can't update swupd.conf for SUS

catfeetstop
Contributor II

I'm trying to make it so my 10.6.8 SUS will host Lion updates. I've followed these (http://support.apple.com/kb/HT4771) instructions but every time I start SUS back up the swupd.conf loses the changes I made. When I start SUS back up it seems to save my edited swupd.conf as swupd.conf.previous and a new swupd.conf is created. Do I have permission problems? My software update repository is not on the primary hard drive. Any ideas?

1 ACCEPTED SOLUTION

catfeetstop
Contributor II

I think I figured this one out. Instead of restarting SUS in Server Admin I started SUS through Terminal. Seems to work.

View solution in original post

10 REPLIES 10

jarednichols
Honored Contributor

Make sure you quit Server Admin after shutting down the service.

catfeetstop
Contributor II

I tried that to no avail

andrew_stenehje
Contributor

I've followed the same procedure and the only issue that I've had, which is very annoying, is that any time that I stop and restart the Software Update service, it wipes out the Lion change in swupd.conf. It also seems to happen at random every once in a while.

I have to re-add Lion to the ReWrite Rule and I always change the ownership and group on the file afterwords to be safe. The swupd.conf file is owned by system and the group is "_softwareupdate".

In my short time managing the Software update tool(s) I've found them to be incredibly buggy.

jarednichols
Honored Contributor

Not sure if anyone saw, but Krause just posted the JAMF NetBoot/SUS appliance. It uses Reposado and gives a web-based front end to it...

catfeetstop
Contributor II

I think I figured this one out. Instead of restarting SUS in Server Admin I started SUS through Terminal. Seems to work.

rhorlick
New Contributor

I'm running into the same issue - every time I relaunch Server Admin (whether running on the server or remotely) it seems to copy the changed file into swupd.conf.previous and recreate the old configuration as swupd.conf. Ironic, huh?

What's the CLI command to restart? Are you using launchctl?

bentoms
Release Candidate Programs Tester

Sounds like what I posted here: http://macmule.com/2012/04/11/error-syntax-error-on-line-241-of-etcswupdswupd-conf-port-must-be-spec...

I had to edit the conf file with server admin running for it to get my change.

lisacherie
Contributor II

Seen problems when server admin was used the conf and plist file were being over-written without the lines to host lion updates from a snow leopard server.

You could try editing the templates for these files here in additional to the files specified in the Apple kbase article to host lion updates:
/System/Library/PrivateFrameworks/SUServer.framework/Versions/A/Resources

rhorlick
New Contributor

bentoms suggestion worked - leave Server Admin open with the SUS service running while editing /etc/swupd/swupd.conf file (where the Apple KB article said to turn off both the service and close the application). Changes even stuck after a the service was stopped and started.

If things end up reverting, I'll look at the files in the SUSServer.framework.

Stevie
Contributor

There are problems which you will need to fix before this will work.

1) Stop the server

The /Library/Server/Software Update/Data/html/index-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog points to nothing so you need to duplicate an existing sucatalog for the server to update. sudo cp /Library/Server/Software Update/Data/html/content/catalogs/others/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog /Library/Server/Software Update/Data/html/content/catalogs/others/index-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog

2) Mac OS X 10.9 clients report into the server as Darwin/13.1.0 clients. The swupd.conf mod_rewrite rule never matched so I created a new rule.

Add this to /Library/Server/Software Update/Config/swupd.conf

RewriteCond %{HTTP_USER_AGENT} Darwin/13.1.0
RewriteRule ^/index.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog

3) Start the server.

This fixed it for me, I hope this helps