ftp.nice.ch/peanuts/GeneralData/Documents/tech-alerts/nifix.tar.gz#/nifix/nifix-info.rtf

This is nifix-info.rtf in view mode; [Download] [Up]

NeXT Technical Alerts 91-3 and 92-1 described the ªNetInfo Loops and Duplicatesº problem, in which apparent duplicate NetInfo directories can be created in a NetInfo domainÐunder normal operation. As of the publication of NTA 91-3, there was no known fix for this problem. As of the publication of NTA 92-1, the nifix program is available; nifix will clean up any apparent duplicates or loops in a NetInfo domain.

Despite the availability of nifix, we still recommend you implement the preventative measures described in NTA 91-3 and NTA 92-1.

Following is annotated output from a sample run of nifix. You should run nifix repeatedly until it runs without giving you any messages (this is similar to how you might use fsck). After completing the repairs, you should reboot the master server for the repaired NetInfo domain. In the following output, input from the user is in fixed-pitch bold, output from the computer is in fixed-pitch, and annotations are indented and italicized.

% niutil -list . /printers
131      bogushost1 
137      bogushost2 
0        
0        
140      LaserWriter6 lw 
141      LaserWriter7 lw 
142      LaserWriter8 lw 
143      LaserWriter10 lw 
144      LaserWriter11 lw 
145      LaserWriter12 lw 

The output from niutil -list is of the form

directory id         property value

In this case, we're listing the /printers directory of the local domain, showing the value of the name property. Note the directory ids of 0, with no name property. Directory 0 is the root directory of a NetInfo domain; it should not be present in a listing such as the above. (The presence of directory 0 indicates a loop has been formed.)

% niutil -list . /machines
2        localhost 
3        broadcasthost 
131      bogushost1 
137      bogushost2 

Note directory numbers 131 and 137, bogushost1 and bogushost2. These also appear in the listing of /printers. A directory should only be in one parent directory. This shows an apparent duplicate directory (two of them, actually).

% nifix -p .

Use the -p option to specify the password, similar to the -p option with niutil, for example. We need to specify -p because we're not root on the master server of the domain (in this case, because we're not root on the local machine, since it's the master server of the local domain).

Password: 
deleting duplicate: /printers/bogushost1
keeping /machines/bogushost1
deleting duplicate: /printers/bogushost2
keeping /machines/bogushost2
deleting bogus directory: /printers/#138
deleting bogus directory: /printers/#139
% nifix -p .
Password:

As noted above, run nifix until it runs without showing any messages. In this instance, all the problems were cleaned up after the first run. The output from nifix can be used to verify that the desired instance of any duplicate directories has been kept.

% niutil -list . /printers
140      LaserWriter6 lw 
141      LaserWriter7 lw 
142      LaserWriter8 lw 
143      LaserWriter10 lw 
144      LaserWriter11 lw 
145      LaserWriter12 lw 
% niutil -list . /machines
2        localhost 
3        broadcasthost 
131      bogushost1 
137      bogushost2 

The loops and duplicates have been removed.

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.