]> mj.ucw.cz Git - nsc-5.git/blobdiff - bin/genzone
DNSSEC: Key hashes and resign-stamp moved to a separate directory
[nsc-5.git] / bin / genzone
index 0a647a985609b466ff81df62de0af6dea6204f3e..6c7bffc3e9d1da4672dae41db845999f2186ca43 100755 (executable)
@@ -13,10 +13,10 @@ Z=$1
 shift
 
 CURRENT_HASH=$($M4 -DHASHING m4/nsc.m4 "$@" | md5sum | cut -d " " -f1)
-if [ -f keys/$Z.hash ] ; then
-       CURRENT_HASH=$CURRENT_HASH:$(cat keys/$Z.hash)
-       if [ -f keys/resign-stamp ] ; then
-               CURRENT_HASH=$CURRENT_HASH:$(stat -c '%Y' keys/resign-stamp)
+if [ -f khash/$Z ] ; then
+       CURRENT_HASH=$CURRENT_HASH:$(cat khash/$Z)
+       if [ -f khash/resign-stamp ] ; then
+               CURRENT_HASH=$CURRENT_HASH:$(stat -c '%Y' khash/resign-stamp)
        fi
 fi
 
@@ -27,7 +27,7 @@ if [ "X$CURRENT_HASH" = "X$PREV_HASH" ] ; then
 else
        $M4 -DVERS=ver/$Z m4/nsc.m4 "$@" >zone/$Z.new
        NEWVER="$(sed -e "s/^;;; VERSION: //; t; d" zone/$Z.new)"
-       if [ -f keys/$Z.hash ] ; then
+       if [ -f khash/$Z ] ; then
                if ! dnssec-signzone -a -d dss -g -K keys/$Z $SIGNZONE_OPTIONS -f zone/$Z.signed -o $Z -S -3 - zone/$Z.new &>zone/$Z.tmp ; then
                        cat zone/$Z.tmp
                        echo >&2 "FATAL: Signing failed"