If the Software Update Server can't be reached during runtime, the clean_up function will run and remove the LD and PLIST, thus resetting the Deferral-times.
Not sure what the smartest solution would be, maybe adding a test like this
Catalog=$(python -c 'from Foundation import CFPreferencesCopyAppValue; print CFPreferencesCopyAppValue("CatalogURL", "com.apple.SoftwareUpdate")')
if curl -s --head --request GET "$Catalog" | grep "200 OK" > /dev/null; then
# Catalog is available, continue with cleanup
else
# Catalog is unavailable, skip cleanup
fi
to either the clean_up function or even earlier in the process could help.
If the Software Update Server can't be reached during runtime, the clean_up function will run and remove the LD and PLIST, thus resetting the Deferral-times. Not sure what the smartest solution would be, maybe adding a test like this
to either the clean_up function or even earlier in the process could help.