Building an automated KBox 1000 agent installer
I’ve historically had problems with deploying the Mac agent installer for our Dell Kace KBox 1000 to our Macs. Installing the package as part of our existing DeployStudio workflows has generally resulted in a broken installation. As a result, installing the agent has been a manual step done by our techs as part of setting up new or reimaged Macs for deployment. We recently upgraded to K1000 5.3 though and this KBase article came to my attention.
With some modification, you can use the commands listed in the KBase article along with the methodology referenced in this post, to repackage a KBox 1000 agent so that it’s deployable as part of an automated workflow. See below the jump for the procedure.
Set up a new Iceberg project. Since we’ll need to run this installer with root privileges, I recommend setting the project type to Darwin: Package. That will open the project with the installation privileges automatically set to root. In this case, I’m naming the project KBox Agent Installer.
Download your KBox 1000 agent installer from your KBox appliance.
Select AMPAgent.pkg and drag it into the Additional Resources section of your Iceberg project.
The last piece is telling your Mac which address the KBox is at and having the the AMPAgent installed. For this, you’ll need a postflight script. Here’s the one I’m using:
#!/bin/sh # Create the /Library/Application Support/Dell/KACE/data on the boot drive mkdir -p "/Library/Application Support/Dell/KACE/data" # Add the server address of the KBox 1000 to /Library/Application Support/Dell/KACE/data/amp.conf echo "host=server.address.here" > "/Library/Application Support/Dell/KACE/data/amp.conf" # Wait 15 seconds sleep 15 # Install the KBox agent /usr/sbin/installer -dumplog -verbose -pkg "$1/Contents/Resources/AMPAgent.pkg" -target /
Once you’ve got the postflight script built, run the following command to make the script executable:
sudo chmod a+x /path/to/postflight
Last step, go ahead and build the package. (If you don’t know to build, check the Help menu for the Iceberg User Guide. The information you need is in Chapter 3 – Creating a package.)
Once the package has been built, test it by taking it to a test machine that doesn’t have your KBox agent installed and install it. The end result should be that your KBox agent should install and check in with the server without needing additional configuration.