]> mj.ucw.cz Git - nsc-5.git/blob - bin/nsconfig
d7951b869b65e217c62250e018300fe5d163aaa3
[nsc-5.git] / bin / nsconfig
1 #!/bin/sh
2 # NSC 2.2 -- Makefile & Config file build script
3 # (c) 1997--1999 Martin Mares <mj@ucw.cz>
4
5 ROOT=/etc/named         # Root dir of the whole package
6 CF=cf                   # Place for all configuration files
7 ZONES=zone              # Place for all primary zone files
8 BAX=bak                 # Place for all secondary zone files
9 VERS=ver                # Place for all primary version files
10 NSC=m4                  # Place for all scripts
11
12 DOMAINS=$CF/domains     # The master domain list
13 MKFILE=Makefile         # Makefile to generate
14 CONFFILE=named.conf     # Configuration file to generate
15 CACHE=root.cache
16
17 if [ \! -f $DOMAINS ] ; then
18         echo "Domain list file missing."
19         exit 1
20         fi
21 m4 $NSC/dnslib.m4 $NSC/mkconf.m4 $DOMAINS >$CONFFILE -DZONEDIR=$ZONES -DBAKDIR=$BAX -DCACHE=$CACHE -DROOT=$ROOT
22 m4 $NSC/dnslib.m4 $NSC/mkmf.m4 $DOMAINS >$MKFILE -DZONEDIR=$ZONES -DBAKDIR=$BAX -DCACHE=$CACHE -DVERSDIR=$VERS -DNSCDIR=$NSC -DCONF=$CONFFILE -DCFDIR=$CF