A simple example of this would be dropping a .mobileconfig file into /tmp/ and then using a postflight script to actually install the Profile to the Mac.Another example would be loading a new Launch Daemon/Agent that was just installed, so it starts working right away.
The chromium site only mentions support for Chromium on this, not OSX, not sure if that's why if I go to Chrome://policy it doesn't show that setting coming down, though it is listed in the plist in HD/Library/Managed prefs - think it doesn't apply to OSX unfortunately. I actually added a script to create the folders right after the Chrome package is installed.
I have always been a little fuzzy about pre and post flight scripts. /bin/sh usernames=`/bin/ls /Users` for user in $usernames do usrloc="/Users/$user/Library/Google/Google Software Update/Google Software Update.bundle/Contents/Resources/ksinstall" if [ -f "$usrloc" ]; then "$usrloc" --nuke /usr/sbin/chown root:wheel /Users/$user/Library/Google /bin/chmod a-rwx /Users/$user/Library/Google fi done if [ -e /Applications/Google\ ]; then latestver=`/bin/ls /Applications/Google\ Chrome.app/Contents/Versions | /usr/bin/sort -n | /usr/bin/tail -1` apploc="/Applications/Google Chrome.app/Contents/Versions/$latestver/Google Chrome Framework.framework/Frameworks/Keystone Registration.framework/Resources/ksinstall" if [ -f "$apploc" ]; then "$apploc" --nuke fi fi exit [email protected] Postflight, preflight, postinstall, preinstall scripts, and a couple of others technically refer to an embedded script within a or installer.
When working with scripts, there are options to run before or after other items have been run. While some folks might use those terms interchangeably with a script run in a Casper Suite policy in a "Before" or "After" state, those aren't actually pre/postflight scripts, although they can kind of act like ones.
The script runs the ksinstall -nuke command from all user directories as well as from the app directory in case it got installed in a system directory. /bin/bash usernames=`/bin/ls /Users` for user in $usernames do usrloc="/Users/$user/Library/Google/Google Software Update/Google Software Update.bundle/Contents/Resources/ksinstall" if [ -f "$usrloc" ]; then $usrloc --nuke chown root:wheel /Users/$user/Library/Google chmod a-rwx /Users/$user/Library/Google fi done apploc="/Applications/Google\ Chrome.app/Contents/Versions/43.0.2357.132/Google\ Chrome\ Framework.framework/Frameworks/Keystone Registration.framework/Resources/ksinstall" if [ -f "$apploc" ]; then $apploc --nuke fi exit [email protected] it's just a script so why not?
A nopayload pkg with just a postinstall script or any other mechanism that Munki may use to execute scripts outside of packages if its allowed. It's hardcoding a folder with a version number which may be out of date by this point. Does this mean you have the script added to the package policy and have it set to run AFTER everything else is finished?