Scripting a dynamic Computer Name & DHCP Client ID

Hello all,

I’m in the midst of finishing a script that tweaks ByHost settings when they don’t carry over after a NetInstall (which is disappointing yet happens). Anyways it does a myriad of things from locking down plists to setting many GUI based variables although I have yet to figure out how to dynamically set the Computer Name and DHCP Client ID to a certain range (eg. “CHAM-PM-A”, “CHAM-PM-2” or “CHAM-ML-1”, “CHAM-ML-2” ect.)? Unfortunately my site is not running an Apple-based DHCP/DNS server (that’s handled through a windows 2000 soon to be 2003 server) and the Xserve is only acting as file share, so nothing can be binded through it’s IP address (that I know of).

I have made some progress through using the networksetup command (which to my knowledge is only available through Apple Remote Desktop commands) and this can change your Client ID, although it has to be done manually for each and every client. I also know of the “sudo scutil --set ComputerName” functionality but again this only allows you to change one client at a time and not dynamically.

My question is there anyway this can be done dynamically through identifying a client and then systematically change a value through AppleScript? Thanks for any input on this.

Anthony>>