--- a/dnssec-creatkey Tue Jul 13 15:32:08 2010 +0200
+++ b/dnssec-creatkey Wed Jul 14 12:05:41 2010 +0200
@@ -18,7 +18,7 @@
for zone in $master_dir/*
do
test -f $zone/${zone##*/}.signed || continue
- test -f $zone/.index.ksk || echo ${zone##/*/}
+ test -f "$zone/.index.ksk" || echo ${zone##/*/}
done
}
@@ -56,7 +56,7 @@
ksk_new=`test_ksk_new`
-for NEW_ZSK_ZONE in $zsk_new $zsk_time $zsk_aenderung # Erstellt ZSK
+for NEW_ZSK_ZONE in $zsk_time $zsk_aenderung # Erstellt ZSK
do
cd $master_dir/$NEW_ZSK_ZONE
echo "erzeugt zsk fuer" $NEW_ZSK_ZONE
@@ -67,7 +67,7 @@
echo 0 > keycounter
done
-for NEW_KSK_ZONE in $ksk_new # Erstellt KSK
+for NEW_KSK_ZONE in $zsk_aenderung # Erstellt KSK
do
cd $master_dir/$NEW_KSK_ZONE
echo "erzeugt ksk fuer" $NEW_KSK_ZONE
--- a/dnstools.conf Tue Jul 13 15:32:08 2010 +0200
+++ b/dnstools.conf Wed Jul 14 12:05:41 2010 +0200
@@ -1,3 +1,4 @@
+BIND_DIR=/etc/bind
SECONDARY=hh.schlittermann.de
PRIMARY=pu.schlittermann.de
THIS_HOST=
--- a/mkready Tue Jul 13 15:32:08 2010 +0200
+++ b/mkready Wed Jul 14 12:05:41 2010 +0200
@@ -1,10 +1,40 @@
#!/bin/bash
set -e
+source dnstools.conf
-BIND_DIR=/etc/bind
+domain="eins.lan"
+master_dir="$MASTER_DIR"
+conf_dir="$ZONE_CONF_DIR"
+bind_dir="$BIND_DIR"
+
+
+for zone_domain in $master_dir/*
+do
+ domain=${zone_domain##/*/}
+ zone_dir="$master_dir/$domain"
+ conf_file="$conf_dir/$domain"
+ zone="$master_dir/$domain/$domain"
+ zone_signed="$master_dir/$domain/$domain.signed"
-cat $BIND_DIR/zones.d/* > $BIND_DIR/named.conf.zones
+ if [ -f $master_dir/$domain/$domain.signed ] # testet ob es eine signed-datei gibt
+ then
+ if ( ! grep "file" $conf_file | grep "signed" ) > /dev/null # testet ob signed nicht in der config-datei steht
+ then
+ cat $conf_file | sed -e "s\\$zone\\$zone_signed\\g" > $conf_file # schreibt signed in die config-datei
+ echo $zone '-->' $zone_signed
+ fi
+ else
+ if ( grep "file" $conf_file | grep "signed" ) # testet ob signed in der config-datei steht
+ then
+ cat $conf_file | sed -e "s\\$zone_signed\\$zone\\g" > $conf_file # schreibt signed in die config-datei
+ echo $zone_signed '-->' $zone
+ fi
+ fi
+done
+
+
+cat $conf_dir/* > $bind_dir/named.conf.zones
named-checkconf
named-checkconf -z
rndc reload