Ha ha. Flattery will get you noware :) Email me directly senorjp at gmail.com. I still owe you a drink from Austin.
On 10/10/08, Mark Hawk Weiss <[EMAIL PROTECTED]> wrote: > Jesse, > > Thanks for the response. I need to elaborate I think. > > > Here is the challenge I am trying to solve. We use NetBoot to image > machines on the network where I work. One challenge with that is that > each machine has essentially the same name, except for an iterative > number at the end of the name. That doesn't work for us. However, as > part of the university internet safety protocol, we have to re- > register our machines with the University at least once each year. The > "registration" process allows us to add our own host name to their > registry database. > > Our idea was to have this little bit of code installed as a file in / > usr/bin called getHostName. > > Then after they were all imaged, we would use ARD and run this little > bit of code as a unix command to each of the machines. > > scutil --set ComputerName $(getHostname | cut -d . -f 1) > scutil --set LocalHostName $(getHostname | cut -d . -f 1) > > These two items would activate getHostName in the user/bin folder, > return the host name and name each machine the returned host name. > > I got this idea from another guy on campus who says it works, but > feels like we need to work out the problems of our department on our > own. I get that. I mean He has stuff to do. But I am not a skilled > unix person, just someone who is willing to keep trying piece by piece > until I get it worked out. I have done so since Tuesday, a little here > and a little there, but still no joy. > > So I thought I would check with the list. > > It is a good idea and when I can get it running, it will save us huge > amounts of time every 6-12 months, or whenever we need to re-image. > > So with that back ground, Oh Great One, Can you help me figure this out? > > thanks > > > Mark Weiss > http://trustthechildren.blogspot.com > > > On Oct 10, 2008, at 6:33 AM, Jesse Parker wrote: > >> How about the command "hostname"? >> >> On Thu, Oct 9, 2008 at 11:16 PM, Mark Hawk Weiss <[EMAIL PROTECTED]> >> wrote: >> Hey, >> >> Does anyone know why this is not working. I have been working on it >> for an hour and can't figure it out. >> >> use Socket;$iaddr = inet_aton(`/sbin/ifconfig | grep 129.123.98 | >> cut -d ' ' -f 2`);printf gethostbyaddr($iaddr, AF_INET); >> >> I keep getting the error >> >> -bash: syntax error near unexpected token `(' >> >> I am trying to get the host name of the computer. >> >> Thanks for the second set of eyes. >> >> >> Mark Weiss >> http://trustthechildren.blogspot.com >> >> ________________________________________________________________________ >> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf >> >> >> ________________________________________________________________________ >> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > ________________________________________________________________________ > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > > ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
