]> mj.ucw.cz Git - nsc-5.git/blobdiff - bin/nsconfig
First step to version 3.0. Changes too extensive to comment them.
[nsc-5.git] / bin / nsconfig
index d103f4d5bc51704d821b7d22186c5a1cd3666475..b104932d6ed9240edb5d7886bd01b5861dacca78 100755 (executable)
@@ -1,24 +1,16 @@
 #!/bin/bash
 # NSC -- Makefile & Config file build script
-# (c) 1997--2000 Martin Mares <mj@ucw.cz>
+# (c) 1997--2003 Martin Mares <mj@ucw.cz>
 
-ROOT=/etc/named                # Root dir of the whole package
-CF=cf                  # Place for all configuration files
-ZONES=zone             # Place for all primary zone files
-BAX=bak                        # Place for all secondary zone files
-VERS=ver               # Place for all primary version files
-NSC=m4                 # Place for all scripts
-
-DOMAINS=$CF/domains    # The master domain list
-MKFILE=Makefile                # Makefile to generate
-CONFFILE=named.conf    # Configuration file to generate
-CACHE=root.cache
+set -e
 
 M4=`which gm4` || M4=`which m4` || ( echo "Unable to find M4!" ; exit 1 )
+DOMAINS=cf/domains
 
 if [ ! -f $DOMAINS ] ; then
        echo "Domain list file missing."
        exit 1
        fi
-m4 $NSC/dnslib.m4 $NSC/mkconf.m4 $DOMAINS >$CONFFILE -DZONEDIR=$ZONES -DBAKDIR=$BAX -DCACHE=$CACHE -DROOT=$ROOT
-m4 $NSC/dnslib.m4 $NSC/mkmf.m4 $DOMAINS >$MKFILE -DZONEDIR=$ZONES -DBAKDIR=$BAX -DCACHE=$CACHE -DVERSDIR=$VERS -DNSCDIR=$NSC -DCONF=$CONFFILE -DCFDIR=$CF -DM4=$M4
+
+$M4 m4/mkconf.m4 $DOMAINS >named.conf
+$M4 m4/mkmf.m4 $DOMAINS >Makefile -DM4=$M4