changeset 1230:24c17a3904b9 draft

Revert "dropped the use of @ so the generated zones would work with yadifa too. also exported env vars so child of bind_tld_zonefile_all.sh can use them" This reverts commit ab834161696a4f9150d1c8f52bb6f0f453950cb7.
author epoch <epoch@hack.thebackupbox.net>
date Wed, 10 Jul 2019 01:12:59 +0000
parents 7259436991c5
children 1a40a96b903a b894e50721f4 4291c23e1fba
files scripts/nameserver_autogen/bind_tld_zonefile.sh scripts/nameserver_autogen/bind_tld_zonefile_all.sh
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/nameserver_autogen/bind_tld_zonefile.sh	Sat May 18 13:26:33 2019 +0000
+++ b/scripts/nameserver_autogen/bind_tld_zonefile.sh	Wed Jul 10 01:12:59 2019 +0000
@@ -16,13 +16,13 @@
 DOM="3.7.f.6.9.3.e.1.3.6.d.f.ip6.arpa"
 RDNS_ZONEFILE="$ZONEFILE_DIR/$DOM"
 
-echo -n 'generating IPv6 reverse lookup zonefile for' $DOM '...' >&2
+echo -n 'generating IPv6 reverse lookup zonefile for...' >&2
 echo "; this zonefile generated on: `date -u`" > "$RDNS_ZONEFILE".tmp
 echo '$TTL 3600' >> "$RDNS_ZONEFILE".tmp
 echo '$ORIGIN' $DOM. >> "$RDNS_ZONEFILE".tmp
-echo $DOM. 'IN SOA' $DOM. 'root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$RDNS_ZONEFILE".tmp
-echo $DOM. 'IN NS ' $DOM. >> "$RDNS_ZONEFILE".tmp
-echo $DOM. 'IN A   127.0.0.1' >> "$RDNS_ZONEFILE".tmp
+echo '@ IN SOA @ root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$RDNS_ZONEFILE".tmp
+echo '@ IN NS  @' >> "$RDNS_ZONEFILE".tmp
+echo '@ IN A   127.0.0.1' >> "$RDNS_ZONEFILE".tmp
 cd $RESDB_PATH/db/ip6/F/D/6/3/1/E/3/9/6/F/7/3/
 for i in  */*/*/*/ns/*;do
  a=$(printf "%s\n" "$i" | cut -d/ -f1-4 | tr '/' '.' | rev)
@@ -55,9 +55,9 @@
  echo "; this zonefile genreated on: `date -u`" > "$RDNS_ZONEFILE".tmp
  echo '$TTL 3600' >> "$RDNS_ZONEFILE".tmp
  echo '$ORIGIN' $DOM. >> "$RDNS_ZONEFILE".tmp
- echo $DOM. 'IN SOA' $DOM. 'root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$RDNS_ZONEFILE".tmp
- echo $DOM. 'IN NS ' $DOM. >> "$RDNS_ZONEFILE".tmp
- echo $DOM. 'IN A   127.0.0.1' >> "$RDNS_ZONEFILE".tmp
+ echo '@ IN SOA @ root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$RDNS_ZONEFILE".tmp
+ echo '@ IN NS  @' >> "$RDNS_ZONEFILE".tmp
+ echo '@ IN A   127.0.0.1' >> "$RDNS_ZONEFILE".tmp
 
  for i in */*/ns/*;do
   [ -e "$i" ] || continue
@@ -82,9 +82,9 @@
  echo "; this zonefile genreated on: `date -u`" > "$ANO_ZONEFILE".tmp
  echo '$TTL 3600' >> "$ANO_ZONEFILE".tmp
  echo '$ORIGIN' $TLD. >> "$ANO_ZONEFILE".tmp
- echo $TLD. 'IN SOA' $TLD. 'root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$ANO_ZONEFILE".tmp
- echo $TLD. 'IN NS ' $TLD. >> "$ANO_ZONEFILE".tmp
- echo $TLD. 'IN A   127.0.0.1' >> "$ANO_ZONEFILE".tmp
+ echo '@ IN SOA @ root ('`date -u +" %Y%m%d%H"`' 60 300 3600000 3600 )' >> "$ANO_ZONEFILE".tmp
+ echo '@ IN NS  @' >> "$ANO_ZONEFILE".tmp
+ echo '@ IN A   127.0.0.1' >> "$ANO_ZONEFILE".tmp
 
  for name in *;do
   if [ -d "$name/ns" ];then
--- a/scripts/nameserver_autogen/bind_tld_zonefile_all.sh	Sat May 18 13:26:33 2019 +0000
+++ b/scripts/nameserver_autogen/bind_tld_zonefile_all.sh	Wed Jul 10 01:12:59 2019 +0000
@@ -1,8 +1,8 @@
 #!/bin/sh
 # be sure to set these variables first.
-#export ANO_ZONEFILE=/etc/namedb/ano
-#export RDNS_ZONEFILE=/etc/namedb/21.in-addr.arpa
-#export RESDB_PATH=/services/resdb/resdb
+#ANO_ZONEFILE=/etc/namedb/ano
+#RDNS_ZONEFILE=/etc/namedb/21.in-addr.arpa
+#RESDB_PATH=/services/resdb/resdb
 if [ ! "$ANO_ZONEFILE" ];then
  echo "You forgot to set some variables. read the source plzkthx." >&2
  exit 1