LoginScriptPlugin icon indicating copy to clipboard operation
LoginScriptPlugin copied to clipboard

postinstall script kills loginwindow and interferes with a munki bootstrap session

Open loceee opened this issue 9 years ago • 4 comments

release 1.0b32 pkg.

loceee avatar Feb 17 '16 03:02 loceee

Hmm, how would you propose fixing this? The postinstall script indeed restarts the loginwindow. How would it know not to restart the loginwindow (and thus killing an active munki session)?

I suppose one option, though perhaps not ideal, is to just have it not restart the loginwindow and instead require a logout or restart on the package?

jessepeterson avatar Mar 11 '16 21:03 jessepeterson

Yeah a requires restart option on the pkg might be more suitable.. not great though...

... or a check for the munkibootstrap flag, and don't kill the loginwindow if it exists. Then the loginwindow kill or restart can left up to the reader.

loceee avatar Mar 14 '16 01:03 loceee

So I think killing the login window interrupts any munki run at the login window, not just a bootstrap run (I think @robperc was seeing this issue). I'd lean towards not killing the login window at all.

jessepeterson avatar Mar 17 '16 16:03 jessepeterson

I ended up modifying the postinstall script to remove the for loop where it kills the loginwindow, and changing the pkginfo to require restart. This fixed the munki run interruption, however it appears the plugin isn't enabled until a SECOND restart, after the restart required by the pkginfo.

robperc avatar Mar 17 '16 17:03 robperc