Hi All,
I meant to make this a Pull Request in github, but my origin is Jordan's branch. Sorrry.
I just pushed a change to munkiserver which is a rewriting of the preflight/postflight scripts in Python. I don't love python, but given the changes in Apple's next OS, I thought it would be wise to switch these scripts to Python and re-use some existing library functions from Munki Directly.
Everything is basically the same, except:
BlockUpdate functionality:
For some of our labs, we've had complaints of machines installing updates at the loginwindow during class time. Usually, it is a non-issue, but there have been times when instructor stations have applied updates and class has been delayed by 5 or 10 minutes. There is now some functionality in the preflight script which will optionally block updates from a specific time. There are more details documented in the script here:
https://github.com/jnraine/munkiserver/blob/3f950f87e28c805051eb9a38f60f2f10e68d2d4f/script/munki_scripts/preflight, but essentially, you will need to set values in /Library/Preferences/ManagedInstalls.plist BlockUpdateStartTime and BlockupUpdateEndTime (specified in 24 hour time). Optionally, you can also define BlockUpdateDays if you only want to limit which days the block occurs. BlockUpdateDays is a list, separated by commas, with the day number of 0 being Monday, 6 being Sunday.
Postflight timeout:
We've been having a problem where postflight scripts take a long time to complete, so I've implemented a 90 second default to timeout in the postflight script. on
Line #36 of the postflight. You can optionally change this value by writing a value in /Library/Preferences/ManagedInstalls.plist PostflightTimeout
I'll document these features on the Wiki.
Let me know if you have any thoughts on this work or find bugs.
Ricky Chilcott
Technology and Facilities Manager
Scripps College of Communication
Ohio University
740-593-4780