Skip to main content
Question

Auto-run and Target HD - regex or variable matching?

  • June 14, 2011
  • 1 reply
  • 5 views

Forum|alt.badge.img+12

Hey,

I'm currently prepping for a big re-imaging project this summer for about 4000 MacBooks. To try to make this smoothing I'm testing the auto-run function, but have one slight problem...

Most of our computers HDs are named MacintoshHD, but some are Macintosh HD, with a smattering of other names as well. If I set MacintoshHD as the target drive name in Casper, those machines work, but others get an error. Is it possible to use some kind of variable so I can specify something like Macintosh%HD to catch BOTH MacintoshHD and Macintosh HD? We'd deal with the non-standard names individuallly, but at least this would catch most of our drives.

Any thoughts?

Jeff

1 reply

Forum|alt.badge.img+31
  • Honored Contributor
  • June 14, 2011

Jeff,

Have you thought about a preflight script that renames the hard drive?

#!/bin/bash

for disk in `bless --getboot` ; do

diskutil rename ${disk} "Macintosh HD"

done

exit 0

Not tested just a quick example