Kostis Netzwerkberatung
Konstantinos Kostis
Talstr. 25, D-63322 Rödermark
Tel. +49 6074 881056, FAX 881058
kosta@kostis.net, http://www.kostis.net/
You may use this software free of charge at your
own risk
netdb 3.0.6 (2001-01-29)
netdb template format files
netdb format files
are templates used to create configuration files (or anything
else you can think of) using
netdb data.
How can we put them to use?
- template format files are templates for a desired
configuration output file. If you need blank lines
between entries in an output file simply have
them in the template format file.
- every character in a template format file will be copied
to the output file for each netdb entry read.
- properties
and functions
in a template format file will be replaced by their values
read from netdb entries.
- properties
and functions
in a template format file look like %property%.
- all properties
and all functions
(where possible) can be used in a format file.
- in addition to properties
and functions,
environment variables can be used in format files using
the same format (eg. %NETDB%).
- properties
and functions
always override environment variables, though.
- if you need a single percent sign '%' in a format file type '%' twice (eg. "%%").
- if there is a name between two '%' that is neither a property nor function nor the
name of a non-empty environment variable, nothing will be
output to allow for empty or missing environment
variables and to emulate MS-DOS batch program behaviour.
The following format file is a template for an IP hosts file
such as /etc/hosts or %systemroot%\system32\drivers\etc\hosts.
This is just an example - use DNS instead.
%ipaddr% %hostname%.%domainroot% %hostname% # %comment%
output using hostname=live, domain=.usr, domainroot=kostis.net,
ipaddr=192.168.0.254, ipmask=255.255.255.0
comment=Red Hat Linux 7.0 (DNS/SMB/DHCP/i4l/netdb/etc.)
192.168.0.254 live.kostis.net
live # Red Hat Linux 7.0 (DNS/SMB/DHCP/i4l/netdb/etc.)
The following format file is a template for an A RR in a DNS
zone file (db.kostis.net).
output using hostname=live, domain=.usr, domainroot=kostis.net,
ipaddr=192.168.0.254, ipmask=255.255.255.0
The following format file is a template for a DNS zone file (db.192.168.0).
output using hostname=live, domain=.usr, domainroot=kostis.net,
ipaddr=192.168.0.254, ipmask=255.255.255.0
| 254 |
IN |
PTR |
live.kostis.net. |