Payload-free package template
Payload-free packages are packages that exist only to run scripts. These are typically scripts you need to run a single time to perform a configuration task. They don’t install any files, thus the name “payload-free”. They are useful in workflows where you are installing packages like InstaDMG or any of the software distribution mechanisms that use packages. You can wrap your script into a payload-free package, and use the same mechanism you use to install software to deliver and run your script.
Here is a template payload-free package you can use to create custom payload-free packages for your own use.
To use it, duplicate it, rename it, and edit the following files:
payload-free.pkg/Contents/Info.plist – edit the CFBundleIdentifier, CFBundleShortVersion, and possibly the IFPkgFlagRestartAction.
payload-free.pkg/Contents/Resources/en.lproj/Description.plist – edit the IFPkgDescriptionDescription and IFPkgDescriptionTitle. Repeat for other languages if desired.
payload-free.pkg/Contents/Resources/postflight – put your script here. Make sure it’s marked as executable and starts with an appropriate “she-bang” line (#!/bin/sh or similar).
May 4, 2011 at 7:44 am
[...] do your modifications in an easy-to-deploy pkg installer. See Greg Neagle’s (Creator of Munki)blog post on creating payload free [...]
June 17, 2011 at 4:11 pm
[...] packages were created using the payload-free-package-template by Greg Neagle < munki, packaging > « Managing Zabbix Agents with [...]
June 17, 2011 at 8:29 pm
[...] packages were created using the payload-free-package-template by Greg Neagle < munki, packaging > « Managing Zabbix Agents with [...]
January 2, 2013 at 5:00 am
[...] You can then push this command out using Apple Remote Desktop, run it over SSH, install it with a payload-less package or even have something like Munki run the script for you. On the 318 Tech Journal, William [...]
January 31, 2013 at 2:36 am
Hi Greg, I was wondering if you can help me fix the issue. I followed all the the steps to test a tiny script to see it in action [pmset -a disksleep 0]. However, when I run the package it does not seem to work although if I run the script ./postflight manually, it works.
Any idea?
January 31, 2013 at 3:59 am
Please ignore this, I got it to work. Seemed like a permission issue. Simon
March 7, 2013 at 5:00 am
[...] DeployStudio and Munki cannot currently install profiles themselves, a payload-free package should be created with it, using this command to install as a device [...]
May 23, 2013 at 9:44 am
[…] Managing OS X – Payload Free Package template […]