ZENworks 11SP2 now includes support for managing Macintosh OS-X devices via ZENworks! This article describes how to wrap the installation files for the ZENworks 11SP2 adaptive agent in a Macintosh OS-X package file. To do this you’ll need a copy of ZENworks 11SP2, a Mac OS-X device and the latest version of the Apple XCode tools. Once you complete this solution you will have a .pkg file that can be sent to your users and installed on their devices.
Building a Mac package to deploy the Macintosh OS-X Agent
Because ZENworks uses a Linux or Windows server to build the adaptive agent packages after an install or system update, it is not possible today to have a Mac OS-X package (.pkg) built automatically. The default is to build a self-extracting and installing .bin file that can then be used by running standard shell commands. However, many Macintosh end-users are uncomfortable or unfamiliar with this process. As such they may be resistant to install the agent unless it is packaged in a familiar format. This document describes how to use the Apple Package Maker utility to create a Macintosh Package File (.pkg) that can be sent to users and used to install the ZENworks Adaptive Agent.
- First you need to make sure that you have the latest version of Xcode installed so that the Package Maker application is available. To do this follow the instructions described here: http://developer.apple.com/xcode/
- On the Macintosh devices where you installed Xcode, create a directory in your home directory called ZenAgent. For instance if you are logged in as jblackett the path to this directory would be /Users/jblackett/ZenAgent.
- Copy the Mac installer package from your Primary Server to the ZenAgent directory on the device you installed the Xcode tools on. The agent is located on the Primary Server in the following directory:%ZENWORKS_HOME%\install\downloads\setup\_all\PreAgentPkg_AgentMacComplete.bin
- Create a script file using vi with the following content. This will be used to launch the installer and log the output to the zenagentinstall.log file.
#!/bin/sh /tmp/PreAgentPkg_AgentMacComplete.bin > /tmp/zenagentinstall.log
- Save the file as zenagent.sh in the ZenAgent folder you created in step 2.
- At a terminal prompt enter the following commands to set ownership and make the files executable:
chmod -R +rx /Users/<username>/ZenAgent chown -R root:admin /Users/<username>/ZenAgent
- Launch Package Maker by running the command
open -a /Developer/Applications/Utilities/PackageMaker.app
- At the Install Properties, in the Organization field enter com.novell
- In the Minimum Target, select Mac OS X v 10.5 Leopard
- Click OK.
- Configure the package properties:
- Select the Configuration tab of the Untitled (Package) pane.
- In the Title field enter ZENworks Adaptive Agent for Mac OS-X
- For the Install Destination, uncheck Volume selected by user and then check System volume.
- Select the Requirement tab.
- Click the +
- In the ‘is’ dropdown select >=
- In the textbox enter 200
- In the Message box, enter Insufficient disk space, please make sure you have at least 200 MB available.
- Click OK.
- Add the files required for installing the agent to your package:
- In Finder, locate your ZenAgent folder.
- Drag the ZenAgent folder to the Drop contents here pane in Package Maker
- In the Destination textbox, enter /tmp
- Select the Scripts tab.
- Click the gear icon next to the Postinstall textbox, and select Choose.
- Browse to your zenagent.sh script; then click Choose.
- Save the package definition.
- Click Build.
- In the Save As field enter ZENAgent; then click Save.
- Now transfer to ZENAgent.pkg file to a test Macintosh device where you want to install the ZENworks agent.
- Run the package and follow the prompts. You should be required to enter administrative credentials.
- When complete the agent will automatically register the device with ZENworks. If you want the z-icon to appear you can logout and then log back in.