Run a networked netinfo database on a laptop

Mar 28, '02 12:15:36AM

Contributed by: NikWest

I am running our master network netinfo database on my TiBook and a couple of clones on other portables. Why? Well, in our company we all use portables and we don't have a Mac OS X based server.

I have been fighting with this configuration for quite a while as it is pretty unstable once you change the network location (e.g. forever bouncing apps). The problem is that no matter what network location you choose, nibindd (the process which controls your netinfo processes) will always start all the netinfo databases no matter if they are appropriate for you current network location or not.

Read the rest of the article for a workaround to this problem...

When you change to a location where you don't want to run a networked netinfo database, just execute the following script as root:

#!/bin/sh

KILL=/bin/kill
NIBINDD_PID=`cat /var/run/nibindd.pid`
LOOKUPD_PID=`cat /var/run/lookupd.pid`

$KILL -TERM $NIBINDD_PID
cd /var/db/netinfo
netinfod -s local
$KILL -HUP $LOOKUPD_PID
This will restart netinfo in standalone mode (only the local netinfo db gets started, nibindd won't get started at all).

A proper solution would be to add information about the network location a netinfo database is supposed to run in, and when you select a new location, check for the tag and start the netinfo setup correctly (too much hassle for me right now ;-)

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020328001536810