make-profile-pkg icon indicating copy to clipboard operation
make-profile-pkg copied to clipboard

Add Option for .profileSetupRetryFailedProfiles

Open hansen-m opened this issue 10 years ago • 1 comments

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"

hansen-m avatar Apr 11 '14 19:04 hansen-m

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..

timsutton avatar Apr 12 '14 15:04 timsutton