Name

pickdns-data — compile the database used by pickdns

Synopsis

pickdns-data

Description

pickdns-data compiles a database in source form, in the file data, into a compiled form, in the file data.cdb, that is used by pickdns(1). The compiled database in data.cdb is a Bernstein Constant Database file.

pickdns-data updates data.cdb atomically, building a replacement in data.cdb.tmp and atomically renaming that replacement into place when it has completely and successfully built it it and written it to disc. So you can use it safely while pickdns(1) is running.

Data format

Trailing whitespace is removed from all lines, then all non-empty lines are recognized as follows:

#comment

Comments are ignored.

#location:prefix

All client IP addresses that match the IP address prefix prefix are to be taken as being in location location.

+name:addr:location

The domain name name maps to the IP address addr for clients in location location. The colon immediately precending it can be omitted if location is a zero-length string.

-name:addr:location

This is an alternative comment line, and is ignored. This permits text-editing tools to turn entries off and on by changing the first character of the line between - and +.

History

pickdns-data was originally part of Daniel J. Bernstein's djbdns toolset in 2000.

Author

Original code and documentation by Daniel J. Bernstein. Documentation modernizations by Jonathan de Boyne Pollard.