diff options
-rw-r--r-- | db/dom/ano/drugs/ns/a.ns.drugs.ano | 1 | ||||
-rw-r--r-- | db/dom/ano/drugs/owner | 1 | ||||
-rw-r--r-- | db/dom/drugs/pcp/ns/a.ns.pcp.drugs | 1 | ||||
-rw-r--r-- | db/dom/drugs/pcp/owner | 1 | ||||
-rw-r--r-- | db/ip6/F/D/6/3/1/E/3/9/6/F/7/3/2/9/2/9/cidr | 1 | ||||
-rw-r--r-- | db/ip6/F/D/6/3/1/E/3/9/6/F/7/3/2/9/2/9/owner | 1 | ||||
-rwxr-xr-x | scripts/add_dom | 10 | ||||
-rwxr-xr-x | scripts/dec2hex | 1 | ||||
-rwxr-xr-x | scripts/nameserver_autogen/bind_tld_zonefile.sh | 35 |
9 files changed, 47 insertions, 5 deletions
diff --git a/db/dom/ano/drugs/ns/a.ns.drugs.ano b/db/dom/ano/drugs/ns/a.ns.drugs.ano new file mode 100644 index 0000000..ad31a96 --- /dev/null +++ b/db/dom/ano/drugs/ns/a.ns.drugs.ano @@ -0,0 +1 @@ +1.79.3.153 diff --git a/db/dom/ano/drugs/owner b/db/dom/ano/drugs/owner new file mode 100644 index 0000000..91f6164 --- /dev/null +++ b/db/dom/ano/drugs/owner @@ -0,0 +1 @@ +somebody diff --git a/db/dom/drugs/pcp/ns/a.ns.pcp.drugs b/db/dom/drugs/pcp/ns/a.ns.pcp.drugs new file mode 100644 index 0000000..ad31a96 --- /dev/null +++ b/db/dom/drugs/pcp/ns/a.ns.pcp.drugs @@ -0,0 +1 @@ +1.79.3.153 diff --git a/db/dom/drugs/pcp/owner b/db/dom/drugs/pcp/owner new file mode 100644 index 0000000..91f6164 --- /dev/null +++ b/db/dom/drugs/pcp/owner @@ -0,0 +1 @@ +somebody diff --git a/db/ip6/F/D/6/3/1/E/3/9/6/F/7/3/2/9/2/9/cidr b/db/ip6/F/D/6/3/1/E/3/9/6/F/7/3/2/9/2/9/cidr new file mode 100644 index 0000000..ece2915 --- /dev/null +++ b/db/ip6/F/D/6/3/1/E/3/9/6/F/7/3/2/9/2/9/cidr @@ -0,0 +1 @@ +fd63:1e39:6f73:2929::/64 diff --git a/db/ip6/F/D/6/3/1/E/3/9/6/F/7/3/2/9/2/9/owner b/db/ip6/F/D/6/3/1/E/3/9/6/F/7/3/2/9/2/9/owner new file mode 100644 index 0000000..3aea3d0 --- /dev/null +++ b/db/ip6/F/D/6/3/1/E/3/9/6/F/7/3/2/9/2/9/owner @@ -0,0 +1 @@ +epoch diff --git a/scripts/add_dom b/scripts/add_dom index 89626f3..50e21c0 100755 --- a/scripts/add_dom +++ b/scripts/add_dom @@ -4,15 +4,15 @@ if [ x"$2" = x ]; then echo "Usage: $0 <dom> <owner> [<ns[/nsip]>...]" >&2; exit 255 fi -dir=db/dom/"$(echo "$1" | tr . '\n' | tac | tr '\n' / | head -c -1)" -mkdir "$dir" || exit 1 -echo "$2" > "$dir/owner" -mkdir "$dir/ns" || exit 1 +dir=db/dom/"$(echo "$1" | tr . '\n' | tac | tr '\n' / )" +mkdir -p "$dir" || exit 1 +echo "$2" > "${dir}owner" +mkdir "${dir}ns" || exit 1 shift; shift; while [ x"$1" != x ]; do echo "$1" | tr / ' ' | ( read ns nsip - echo "$nsip" > "$dir/ns/$ns" + echo "$nsip" > "${dir}ns/$ns" ) shift; done diff --git a/scripts/dec2hex b/scripts/dec2hex index e997b20..9194d01 100755 --- a/scripts/dec2hex +++ b/scripts/dec2hex @@ -1,4 +1,5 @@ #!/bin/sh +# maybe use? not sure if this would break anything. : printf "%02X" $1 ( if [ x"$USE_BC" = x1 ]; then echo -n "obase=16; " diff --git a/scripts/nameserver_autogen/bind_tld_zonefile.sh b/scripts/nameserver_autogen/bind_tld_zonefile.sh new file mode 100755 index 0000000..72c1128 --- /dev/null +++ b/scripts/nameserver_autogen/bind_tld_zonefile.sh @@ -0,0 +1,35 @@ +#!/bin/bash +#made for bash. not sure if all /bin/sh work. +#be sure to edit these variables first. + +ANO_ZONEFILE=/etc/namedb/ano +RESDB_PATH=/services/resdb/resdb + +echo "; this zonefile genreated on: `date`" > $ANO_ZONEFILE +echo '$TTL 3600' >> $ANO_ZONEFILE +echo '@ IN SOA localns root ('`date +" %Y%m%d00"`' 60 300 3600000 3600 )' >> $ANO_ZONEFILE +echo '@ IN NS localns' >> $ANO_ZONEFILE +echo 'localns IN A 127.0.0.1' >> $ANO_ZONEFILE + +cd ${RESDB_PATH}/db/dom/ano + +echo -n generating zonefile... +for name in *;do + if [ -e "${name}/ns/" ];then + for server in "$name"/ns/*;do + if grep '\.ano$' <<< $name > /dev/null;then + true + fi + if grep '\.ano$' <<< $server > /dev/null;then + true + fi + fqserver=`cut -d/ -f3- <<< $server` + echo -e "${name}\tIN NS\t${fqserver}." + for ip in `cat ${server}`;do + echo -e "${fqserver}.\tIN A\t$ip" + done + done + fi +done >> $ANO_ZONEFILE +echo done. +echo might want to send a sighup to your named now. |