CVTZONE(1)

NAME
cvtzone - convert a DNS zone file to updatehosts database format

SYNOPSIS
cvtzone [ -a ] [ -c -d default_domain [ -h ] [ -i ip_address_prefix ] -o output_directory

DESCRIPTION

cvtzone is a utility to convert an existing DNS zone file to updatehosts format. The zone file is read from stdin. The output is a set of updatehosts relations located in the directory specified by the -d option.

The -a will append output to an already existing set of relations.

The -c option will add comments from the zone file. The comments are placed in the same location they are found in the zone file. Only full comment lines are added. Comments at the end of a zone file record are ignored.

The -d option is required and specifies the default domain name for this set of input records.

The -h option outputs a short command synopsis.

The -i option specifies an option IP address prefix for the IP addresses found in A records.

The -o option which is required specifies a directory where the updatehosts relations are found.

Readinfo Record Generation

cvtzone generates readinfo records using the default domain and the IP address prefix to generate a correct #FIELDS line which allows domain names and IP addresses to be written in a shorthand manner. All domains are shortened by chopping off the default domain name suffix. Those domain names which are in a different domain are written fully qualified with a trailing period.

If the -i option is present all IP addresses which start with the IP prefix have it removed. All other IP address will be written as a standard dotted decimal IP address with a leading period ("."). The leading period denotes that the default IP prefix is not prepended to the address. Without the -i option all IP addresses are written in standard dotted-decimal notation and there is no default prefix for IP addresses.

Each invocation of cvtzone generates a new readinfo #FIELDS line. This is convenient for converting multiple zone files where the default domain or the default IP prefix have different values.

See also

updatehosts(1), gendns(1), readinfo(1)