make-profile-pkg
make-profile-pkg copied to clipboard
Add Option for .profileSetupRetryFailedProfiles
It might be useful to add an option for the postinstall script to touch /var/db/ConfigurationProfiles/Setup/.profileSetupRetryFailedProfiles
System Image Utility does this when you add a configuration profile:
targetVol="${1}"
profilesDir="${targetVol}/var/db/ConfigurationProfiles"
...
/bin/rm "${profilesDir}/Setup/.profileSetupDone" > /dev/null 2>&1
/usr/bin/touch "${profilesDir}/Setup/.profileSetupRetryFailedProfiles"
Seems reasonable, although it would be nice to know exactly what this is does.
If I set the debug options as shown in that SIU script and re-run what looks like the startup mode for ManagedClient:
sudo /usr/libexec/PlistBuddy -c "Add :debugOutput string -2" "/Library/Preferences/com.apple.MCXDebug.plist"
sudo /usr/libexec/PlistBuddy -c "Add :collateLogs string 1" "/Library/Preferences/com.apple.MCXDebug.plist"
sudo /System/Library/CoreServices/ManagedClient.app/Contents/MacOS/ManagedClient -i
And tail the log file:
tail -f /Library/Logs/ManagedClient/ManagedClient.log
retryFailedProfiles doesn't seem to have much effect on Configuration Profiles that I butcher with invalid XML (they "install" anyway). Maybe it's only used for enrolment profiles, or just not yet implemented? Maybe somebody who actually uses enrolment profiles could test this..