I'm not sure where the best place to post this question is, so any help or guidance would be appreciated.
My problem is simple. I want to set the user dock on a lab of iMacs. I already have dockutil 2.0 installed on all the machines. So I'm thinking a simple two step process, first ...write a script for dockutil to customize the dock, and second ... build a payload free package to deploy and run the script.
This is my test script.
#!/bin/bash
#Set Dock Applications
/usr/local/bin/dockutil --remove all --allhomes --no-restart
/usr/local/bin/dockutil --add "/Applications/Launchpad.app" --allhomes --no-restart
/usr/local/bin/dockutil --add "/Applications/Safari.app" --allhomes --no-restart
/usr/local/bin/dockutil --add "/Applications/Firefox.app" --allhomes --no-restart
/usr/local/bin/dockutil --add "/Applications/Google Chrome.app" --allhomes
exit 0
When I run the script manually everything looks great. So on too step two.
I'm using Packages to build a payload free pkg, that runs my script as the postinstall script. The package gets built without any errors and when I run the pkg, the installer finishes with a "Installation was completed successfully", but my dock doesn't change.
Thinking maybe it was something with Packages. I also built a payload free pkg with pkgbuild, following Der Flounder's instructions:
http://derflounder.wordpress.com/2012/08/15/creating-payload-free-packages-with-pkgbuild/
sudo pkgbuild --identifier com.company.pkg --nopayload --scripts /pathtoscriptsfolder /pathtodestination.pkg
But I get the same result. The pkg runs with a successful installation, but nothing changes. I have to assume it's something with my packages since I can run shell script without any issues. I've spent a lot of time trying to troubleshoot and rebuild the pkg but I'm stumped.
Any Ideas?