Skip to main content
Question

Software Update Server Updates automatically disabling


Show first post

138 replies

timtimtim
Forum|alt.badge.img+7
  • Contributor
  • 19 replies
  • August 11, 2016

About deprecating ASUS, I'm really wondering how Apple would like us to schedule updates in the future then. They wouldn't just shut it down now, would they?


Forum|alt.badge.img+7
  • Contributor
  • 36 replies
  • August 12, 2016

What kind of software update server disables software updates you've enabled. Answer, and Apple Software Update Server!! Pretty bad on Apples part not fixing this... then to have a script that can work around the issue and not share it due to NDA?? Why would they do that? Crazy...


Forum|alt.badge.img
  • New Contributor
  • 1 reply
  • August 15, 2016

Hey guys, been lurking this thread the past few months. I wanted to thank you all for taking the time to document your troubleshooting techniques and solutions.

@dliberti 's method has proved successful for me the past few weeks, and my updates have remained enabled since. I'm not a great programmer, but I quickly put this script together, and have used it the past few days with success, tested on OSX 10.10.5 with Server 4.0.3, OSX 10.11.3 with Server 5.0.15, and OSX 10.11.6 with Server 5.1.7.

https://github.com/jmunzo/OSX-scripts/blob/master/ASUS_Manual_Update.sh

I commented it up as much as possible. Feel free to modify it / point out issues or corrections / tell me it sucks, haha. I know it's temporary, what with Server 5.2 set to deprecate ASUS, but for now this has been tiding me over.

Thanks again for all the information and documentation!


Forum|alt.badge.img+9
  • Author
  • Valued Contributor
  • 94 replies
  • September 12, 2016

@kish.jayson Its very possible they wont keep the catalogs going. im hoping they are going to roll some sort of control mechanism into cache server. But i have a strange feeling we are just going to be abandoned and there going to expect corporate users to just trust them on every update.

I hope im wong, but Apple does have a history of forcing change even when its not need or not to the betterment of the user.


Forum|alt.badge.img+9
  • Author
  • Valued Contributor
  • 94 replies
  • September 13, 2016

@jmunzo Just wanted to say i love the script its refreshing to see such dedication to comments and just a easy to follow structure!


Forum|alt.badge.img+1
  • New Contributor
  • 2 replies
  • September 28, 2016

First off, thanks for the script. I've looked at the man pages but can't find if there Is there a way to get a list off all the update IDs via the terminal. Anyone know if that is possible and how?
Looking through the script, it looks like I have to enter each ID. I'd like to enable all and then perhaps disable as I am coping the updates to a server on a stand alone network.


Forum|alt.badge.img+10
  • Valued Contributor
  • 229 replies
  • September 29, 2016

Hello, if you only need to disable or enable ALL updates at once, you can stop SUS and manually edit /Library/Server/Software Update/Status/com.apple.server.swupdate.plist by changing the true/false key value for all occurrences

TextWrangler works well because it lets you unlock com.apple.server.swupdate.plist when editing/saving it.
Then simply restart SUS service
There are currently some 1420 product updates on my SUS so this is not a real solution to quickly manage enablig/disabling multiple products (e.g. disabling ALL "voices" or "speech" related updates at once)
Cheers
Carlo


Forum|alt.badge.img+14
  • Contributor
  • 238 replies
  • September 29, 2016

My initial testing shows this issue to be fixed in Server 5.2. Considering it is deprecated I am surprised.


Forum|alt.badge.img+1
  • New Contributor
  • 2 replies
  • September 30, 2016

TextWrangler didn't quite work due to permissions issues. I'm not sure why I didn't think of it before, but I just used vi and did a global substitution. %s/<false/<true. First I made the changes to a backup copy, then swapped the two files and restarted SUS. It took a bit for it to read read all the enabled updates. Well see if they stay enabled.


Forum|alt.badge.img+8
  • Contributor
  • 64 replies
  • February 24, 2017

@powellbc I just set up a brand new Mac Mini server with macOS 10.12.3 and Server 5.2. I enabled 6 updates this morning and now they're disabled. So, for me, the bug is still there. This Mac Mini was new out of the box, so it was a clean set up. The only thing is, 10.11 was installed so I did an upgrade to 10.12.3, then installed Server 5.2.

I am not sure how to resolve this permanently. I'll take a look at the script that jmunzo created.


Forum|alt.badge.img+14
  • Contributor
  • 238 replies
  • February 24, 2017

Just last week I was told unequivocally that the bug will not be fixed by Apple support (which is expected with the deprecation of Apple SUS). I spoke too soon on the 5.2 "fix."

I have been using a script from Apple to address this. To use it:

  1. Enable desired updates.
  2. Quit Server.app
  3. Run the script. When Apple sent it to me it was named swupdate_check_and_enable.sh.
#!/bin/bash

# Require root to execute
if [ $EUID != 0 ]; then
echo "This script must be run as root, or used with sudo.  Please try again."
exit 1
fi

# Define variables for the script

servicePlist="/Library/Server/Software Update/Status/com.apple.server.swupdate.plist"
pendingDir="/Library/Server/Software Update/Status/.pending/"
updatesArray=($(awk 'BEGIN {FS="<|>";OFS="
"} /productId/{getline;print$3}' "$pendingDir".ticket_enable*))

# Check current status of updates that have a .ticket_enable_<productID> file in .pending
# and enable any updates not yet enabled

for i in "${updatesArray[@]}"

do

updateName=$(/usr/libexec/PlistBuddy -c "Print :workingSetProducts:$i:IFPkgFlagProductFamily" "$servicePlist")
updateVersion=$(/usr/libexec/PlistBuddy -c "Print :workingSetProducts:$i:CFBundleShortVersionString" "$servicePlist")
updateStatus=$(/usr/libexec/PlistBuddy -c "Print :workingSetProducts:$i:enable" "$servicePlist")

    if [ "$updateStatus" = "true" ]
        then
        echo "$i - $updateName $updateVersion is already enabled, removing the pending ticket status."
        /bin/rm "$pendingDir".ticket_enable_"$i"
        else
        echo "$i - $updateName $updateVersion is pending, but not yet enabled. We will enable it now."
        /usr/libexec/PlistBuddy -c "Set :workingSetProducts:$i:enable true" "$servicePlist"
        /bin/rm "$pendingDir".ticket_enable_"$i"
    fi

done

exit 0

Forum|alt.badge.img+8
  • Contributor
  • 64 replies
  • February 24, 2017

@powellbc thanks so much for that script! I'll give it a shot.


Forum|alt.badge.img+14
  • Contributor
  • 238 replies
  • February 24, 2017

PS: This was their suggested list of replacements:

  1. Reposado: https://managingosx.wordpress.com/2011/05/04/introducing-reposado/
  2. JAMF NetSUS: https://www.jamf.com/jamf-nation/third-party-products/180/netboot-sus-appliance?view=info
  3. Glarysoft Software Update: http://alternativeto.net/software/glarysoft-software-update/

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings