DeployStudio - iLife Workflow Branching
These directions will guide you through using a Workflow Branching script to automatically install the right version of iLife based upon the machine's Purchase Date. This setup will only work on DeployStudio RC129 or later and has only been test on a Lion-based Netboot set (your mileage may vary on 10.6 and earlier).
Note: The machine running the workflow *must* have internet access and must be able to contact www.apple.com for this script to work properly.
To get warranty information into your DeployStudio Workflows, follow these steps.
- Grab the latest version of warranty2.sh from this page: https://github.com/rustymyers/warranty
- Open DeployStudio Admin and go to the Scripts section.
- Click the + sign to make a new script and name it warranty.sh or anything else that makes sense to you.
- Delete the default contents out of the new script you just created in DeployStudio Admin.
- Select all the contents of the script you downloaded from GitHub and paste them into the warranty.sh script in DeployStudio Admin.
- Change #!/bin/bash to #!/bin/sh (DeployStudio uses sh by default.)
- Click save.
- Go to the workflow that you would like to have warranty information in.
- Add a new Script Task (Generic Task).
- Select the warranty.sh script in the Command section
- In the Parameters section, put in "-f DSProperties" (minus the quotes of course)
- Check the automate box.
- Click save.
You should now have custom Properties in your task sequence that contain the warranty information of the machine that runs the workflow. The properties available are listed below:
SERIAL_NUMBER PURCHASE_DATE WARRANTY_EXPIRES WARRANTY_STATUS MODEL_TYPE ASD
These variables can be access in the normal fashion ( $PURCHASE_DATE for instance). Enjoy!
iLife Branching Script
- Grab the iLifeBranchingScript.sh from https://github.com/natewalck/DeployStudioScripts/blob/master/iLifeBranchingScript.sh
- Create a new Workflow that contains an "Install a Package" task. Point the Install Package task to your desired iLife Package and make sure that "Automate" is checked. I also suggest selecting "Last restored volume" for the Target volume.
- Get the Workflow ID for your iLife workflow. The ID can be found in YourDeployStudioShare/Databases/Workflows/. It is easiest to search the files for "iLife" or whatever you've named the workflow using TextWrangler.app or a similar tool. Repeat steps 1 and 2 for each version of iLife you may need to install and document it somewhere.
- Modify the iLifeBranchingScript.sh so it contains your own Worfklow IDs or Names. It is highly suggested to use the Workflow ID because the Workflow Name can change without having to edit the script. If you reference the name and then change it in the GUI, it will break the Branching script. Here is an example
echo "RuntimeSelectWorkflow: 090812115726" echo "RuntimeSelectWorkflow: Install iLife 08"
- Now that iLifeBranchingScript.sh is updated with your own workflow IDs, Open DeployStudio Admin.app and go to the Scripts Section.
- Click the + button to create a new script, name it iLifeBranchingScript.sh. Delete the default contents out of the Script in DeployStudio Admin.
- Select all on the modified iLifeBranchingScript.sh, then copy and paste it into DeployStudio Admin.
- Once the iLifeBranchingScript is in place, click the save button in the bottom right.
- On your Imaging workflow or any other workflow you would like to use this on, add a Workflow Meta Task.
- In the Workflow Meta Task, under Embed workflow, select "Returned by script..."
- Select the iLifeBranchingScript.sh in the right hand box and click save on the bottom right.
- You should be set! Test thoroughly before using in production.