The JSS doesn't have the ability to name machines using the serial number,
On 7/1/10 12:57 PM, "James Fuller" <JaFuller at starbucks.com> wrote:
but we recently deployed several new machines by creating a single
PreStage Imaging entry for each machine based on the MAC address. This
guaranteed that each machine received the computer name we wanted it to
have. For you, you can limit the scope by using the serial number.
This sounds more tedious that it really is because you can set up one
PreStage entry for one machine and then duplicate it to make more. All you
have to change in your case is the machine name and serial number for each
entry. This might take about 20 seconds per entry unless you can
copy/paste from a list.
--
William Smith
Technical Analyst
Merrill Communications LLC
(651) 632-1492
You could always create a simple script with a case statement...
To get the name...
You could export list of machines and just grab the serial, or get via CLI.
I think ioreg, system_profiler...more than one way to grab the serial number, then set it via scutil.
It can then be a startup item, launchd item, re.local script, etc...or run on demand.
There are other imaging products that have this built-in, but there is a baseline method that'll work with just about any.
-j
We name our based on IP address and Serial number here is the line for
naming it
logger "Setting Bonjour and Computer Names"
SERIALNUMBER=`ioreg -l |grep IOPlatformSerialNumber | awk '{print
$4}' | cut -d " -f 2`
SECONDOCTET=`ifconfig -a | grep inet | grep -v inet6 | awk '{print
$2}' | grep ^10. | head -n 1 | awk 'BEGIN {FS="."}; { printf "%03d", $2
}'`
COMPUTERID="A""$SECONDOCTET""$SERIALNUMBER"
logger "Computer name is $COMPUTERID"
scutil --set LocalHostName "$COMPUTERID"
scutil --set ComputerName "$COMPUTERID"
D. Trey Howell
ACMT, ACHDS, CCA
trey.howell at austinisd.org
Desktop Engineering
twitter @aisdmacgeek