Skip to content

Latest commit

 

History

History
 
 
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\vieww12560\viewh15520\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural

\f0\b\fs28 \cf0 Apply Firmware Password
\f1\b0\fs24 \
\
System Administrators can use package installers to customize the deployment workflow created by System Image Utility.  While package installers are typically used for software installation, they also function well as shell script containers.  Shell scripts have long been used for deployments, but they tend to make highly-customized mass deployment daunting for less experienced system administrators.  This example demonstrates how to build an AppleScript-based, System Image Utility Automator Action that conceals the complexities of a shell-based post-restore task.\
\
This Automator Action includes a shell payload-free package installer.  When run, the action will copy the package to /tmp and modify parameters in the postflight script to match user choices. System Image Utility passes an image information dictionary as input to each Automator Action in the workflow.  By adding the package's path to the packageList array within this imageInfo dictionary, System Image Utility's Create Image action will copy the referenced package installer into the NetInstall set, and the client will install that package at restore time.  The package installer won't actually install anything, but will then run the modified postflight script.\
\
\

\f0\b Requirements:\

\f1\b0 System Image Utility version 10.5 (Install the Leopard Server Admin Tools)\
Leopard 10.5 (Client or Server)\
\
\

\f0\b Building this Sample Code Project\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f1\b0 \cf0 Before you begin, keep in mind that System Image Utility requires that you have attached another system, hard drive, or Installer DVD that contains a full installation of Mac OS X Leopard or the Leopard Installer.\
\
1. Active Target: Choose the World target\
2. Active Build Configuration: Release\
3. Click the Build & Go button.\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
\cf0 4. System Image Utility will launch.\
\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
\cf0 \ul \ulc0 Building a sample workflow:\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
\cf0 \ulnone 5. In System Image Utility, choose your secondary hard drive with Leopard installed (or the Leopard Installer). Choose the NetInstall option, then click the "Customize" button.\
6. In the Automator Actions palette, drag the Apply Firmware Password action into the canvas after the "Define Image Source" action that is already there.  Provide a password and verify it in the second field.\
\
Note: Some warnings may be generated by the Automator view -- these may be safely ignored.\
\
7. Add the "Create Image" action into the canvas.\
8. Click on "Run" to run the workflow.  \
9. When the workflow has completed, NetBoot a client machine using the NetInstall set and verify that your provided password has been applied to the system.\
\
\

\f0\b What else is included in this project?\

\f1\b0 AppleScript Studio-based Automator Actions deliver action output in the form of a "NSAppleEventDescriptor" object.  Because System Image Utility actions expect an NSMutableArray, a converter action is required for the next action in the workflow to work with the output from this action.  An Xcode project containing such a converter action is included as a reference within this action.  Whenever an AppleScript Studio-based Automator Action is deployed for use with System Image Utility, both the AStoObjC.caction and the ApplyFirmwarePassword.action files must be installed in ~/Library/Automator or /Library/Automator.\
\
There are two targets: Apply Firmware Password and "World".  The Apply Firmware Password target builds only the ApplyFirmwarePassword action, while the "World" target builds both the AStoObjC converter action and the ApplyFirmwarePassword action.  The primary target in each project has a Run Shell Script build phase that copies the build product to ~/Library/Automator.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
}