[Casper] Using a script to deploy a restore partition
Leacy, Miles
Miles.Leacy at PoloRalphLauren.com
Wed Apr 9 09:31:26 PDT 2008
Hello all,
In the interest of promoting ³no-touch deploys², here is a script that I run
as a ³before² script to deploy a Restore partition when imaging new machines
with Casper.
This runs and has been tested in 10.5.2. Even if you are running Tiger in
your organization, you can use this script if your restore/utility images
are Leopard.
Note: In my environment, the /Users directory lives on a partition called
Data. I recommend this configuration as it allows you to do whatever you
like to the boot drive without worrying about your clients¹ data.
################################################
#!/bin/sh
## SCRIPT PARAMETERS
volume='/Volumes/Macintosh HD'
mac='20g'
restore='20g'
data='0b'
# If restore partition does not exist, resize Macintosh HD and create
Restore and Data partitions.
if test -e /Volumes/Restore
then
# Restore partition already exists.
echo "Restore partition already exists."
else
# Restore partition does not exist.
echo "Resizing Partitions..."
/usr/sbin/diskutil resizeVolume "$volume" $mac JHFS+ Restore
$restore JHFS+ Data $data
fi
# Copy the restore image to the data partition
echo "Copying Restore image..."
ditto /Volumes/CasperShare/Packages/Restore_Image_Leopard.dmg
/Volumes/Data/Packages/Restore_Image_Leopard.dmg
# Apply Restore image with asr
echo "Restore the Restore with ASR"
/usr/sbin/asr restore -source
/Volumes/Data/Packages/Restore_Image_Leopard.dmg -target /Volumes/Restore
-erase -noprompt -noverify
# Remove cached package from Data partition
rm -Rf /Volumes/Data/Packages
echo "Restore image has been deployed."
################################################
--
Miles Leacy
Senior Macintosh Technician
Polo Ralph Lauren
212-318-7603
miles.leacy at poloralphlauren.com
This message and any attached documents contain information which may be confidential, subject to privilege or exempt from disclosure under applicable law. These materials are intended only for the use of the intended recipient. If you are not the intended recipient of this transmission you are hereby notified that any distribution, disclosure, printing, copying, storage, modification or the taking of any action in reliance upon this transmission is strictly prohibited. Delivery of this message to any person other than the intended recipient shall not compromise or waive such confidentiality, privilege or exemption from disclosure as to this communication. If you have received this communication in error, please immediately notify the sender and delete the message from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20080409/fb598d79/attachment-0001.htm
More information about the Casper
mailing list