Hiya,
I’m writing a script for Macs that’ll retain the computername an AD information for a NetInstall image. I’m doing it through a pre-install script that will create a new volume and write the Hostname to that volume. The post-flight script will fetch the variable from the new volume and apply it to the ComputerName and LocalHostName vars in the script. MergePartitions will then delete the new volume and then apply the AD bind script.
The problem is that I’m dealing with five or six different SKUs that the script can be applied to, with HDD sizes varying from 60 to 500 gigabytes. And according to the resizeVolume man-page, you can only used specified file sizes for the volume. Meaning, if I use the lowest common denominator, I’ll be reducing the volume of the bigger HDDs significantly.
So the question is, how can I achieve a dynamic volume size that won’t cut away a lot of the original volume to Free Space?