Scrawls from Preston...

Powered by Pelican.

Fri 12 March 2010

Turning a Mac Lab into a disc burning machine

Have a lab of Macs - need to burn a bunch of CD or DVDs? Harness those monkeys!

No one part of this solution is all that earth shattering, but it is a simple clever combination of steps.

So you have a bunch of Macs in a lab - you have Network accounts and server based home folders working, and a fast network. Here are the steps to turn that lab into a fast burn factory for optical disks.

* First, create a network home folder user, I call mine burn.

* Set a few settings for that user, such as to ignore blank media when inserted.

* Create your master .img .dmg or .cdr lets call it 'burnme.img', on any machine and then copy it to the Desktop of the burn user.

* Create a burn.command file on the Desktop whose contents is:

burn.command (make executable):

#!/bin/bash

hdiutil burn ~/Desktop/burnme.img

Now you can execute two sets of commands through ARD. The first will log a set of machines in as the burn user (you need to enable assistive devices in UniAccess prefs for this to work):

osascript -e 'tell application "System Events" to keystroke "burn"'; \

osascript -e 'tell application "System Events" to keystroke tab'; \

osascript -e 'tell application "System Events" to delay 0.5'; \

osascript -e 'tell application "System Events" to keystroke "burn"'; \

osascript -e 'tell application "System Events" to delay 0.5'; \

osascript -e 'tell application "System Events" to keystroke return'

The next ARD UNIX command is a simple command to execute the burning:

open ~/Desktop/burn.command

Using the combo of the open command with a command file will give you the visual feedback on each machine, as well as return from the ARD task immediately.

The hdiutil command will even wait for media to be inserted if you execute the above before a blank disc is inserted.

I believe hdiutil also uses buffer under-run protection so even if you hit a network bottleneck - you shouldn't end up with coasters. On a gigabit connection I've done up to 13 machines at the same time no problem.


https://ptone.com/dablog