NetInfo /machines "serves": what is this?

michaelsanford

Translator, Web Developer
What does this key represent? From what I can tell, it means "if you open this 'name' in the Finder's Connect to Server it will open this folder"? Does this have to be a local folder? Can it be blank, or even deleted from certain 'machines'?

ip_address and name are pretty straightforward :p
 
michaelsanford said:
What does this key represent? From what I can tell, it means "if you open this 'name' in the Finder's Connect to Server it will open this folder"? Does this have to be a local folder? Can it be blank, or even deleted from certain 'machines'?

ip_address and name are pretty straightforward :p

This has nothing specifically to do with file sharing and absolutely nothing to do with local folders.

The items in "machines" are the resolvable domain names that apply to your computer (almost always assigned to 127.0.0.1). The "localhost" name is already assigned by default. I've never set the "serves" value to anything other than "local" because I don't use NetInfo to serve other nodes on the network.

Once you assign domain names to your system you can connect to your machine through a web browser in the same manner as http://localhost or http://MyAppletalkName.local. If you configure Apache's Virtual Hosts to respond to the domain names you've assigned to your computer then you can have several local domain names that bring up different local websites. I use this method to do staging of sites I'm developing for my web clients.

If you set up a Mac as a webserver you use the same method to assign its world-visible domain names. I use this method in conjunction with DynDNS/EasyDNS services to run a webserver over my DSL line.

This facility in NetInfo is similar to the "hosts" file on other systems, including Mac OS 9. But on Mac OS X it not only allows a computer to acknowledge its local domain names but also makes those names resolve ahead of any DNS resolution. So, for example, you can make a local site that mimics apple.com and assign "apple.com" as one of your machine's names.
 
"This facility in NetInfo is similar to the hosts file"... that's what I was looking for hehe.

My application: I have a RH9 machine on my LAN called trogdor.local, and since RedHat is not Rendezvous-aware, I wanted to be able to use a consistent naming scheme throughoug my LAN, and use, if I could, NetInfo to locally bind the fake Rendezous name to the server's static IP.

(I wasn't inside my LAN when I asked this question, but now that I'm back, I see that it works. I THINK maybe that serves could be used to map NFS partitions??)
 
Back
Top