- This topic has 3 replies, 4 voices, and was last updated 14 years, 11 months ago by Patrick Fergus.
-
AuthorPosts
-
March 31, 2009 at 3:08 pm #375855userosxParticipant
Is there a way to inject the computer name into the InstaDMG process? I have a launchd daemon that automatically renames the computer at first boot. However, I still need to populate a generic name in the image process.
March 31, 2009 at 3:33 pm #375857Rusty MyersParticipantI don’t know about during the build, but after the build, I set this:
#Set hostname
hostName=InstaDMG
/usr/sbin/scutil –set ComputerName $hostName
/usr/sbin/scutil –set LocalHostName $hostNamePerhaps adding $3 somewhere will help?
April 1, 2009 at 2:09 pm #375869aaronwyattParticipantWhy do you need to populate a generic name in the image creation process?
April 3, 2009 at 3:43 pm #375915Patrick FergusParticipantCould be that the “powers that be” at userosx’s facility don’t want nameless machines running around on the network. By default, imaging with InstaDMG for us leaves the name blank (since the Setup Assistant never runs and never has an opportunity to rename the machines). The computer then temporarily seems to name itself its IP address. Easy for me to find the right machine–the one that has an IP address for a name [i]and[/i] correctly responds to my AD creds in ARD is the right machine.
But to point userosx in the right direction, you have two options I can see:
– If you absolutely cannot have a machine on the network with the name that InstaDMG chooses by default, take thespider’s script (which only works on the current startup disk, btw, it doesn’t work as a CustomPKG from my experience) and mix with [url=http://www.fernlightning.com/doku.php?id=software:fseventer:start]fseventer[/url] to try to figure out what is being edited. Compare, contrast, and write a shell script to mimic what scutil is doing.
– If you can wrangle having a nameless machine on the network for a minute or two, it would probably be easier to use thespider’s script to set the name on startup of a freshly imaged machine. You’ll need to restart after setting the name. You could even extend this to making a custom name for the machine by using a unique value (MAC address is a good choice) or by looking it up (a la set-names.sh from the now-deprecated NetRestore).
– Patrick
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed