From febca5dadfbaaaa67661b8004008fbc9f5856363 Mon Sep 17 00:00:00 2001 From: cathugger Date: Thu, 19 Jul 2018 14:05:14 +0000 Subject: add missing cidr entry, fix abslimit's IP entry, tweak bind autogen script --- scripts/nameserver_autogen/bind_tld_zonefile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/nameserver_autogen/bind_tld_zonefile.sh') diff --git a/scripts/nameserver_autogen/bind_tld_zonefile.sh b/scripts/nameserver_autogen/bind_tld_zonefile.sh index 823159a..e80edb5 100755 --- a/scripts/nameserver_autogen/bind_tld_zonefile.sh +++ b/scripts/nameserver_autogen/bind_tld_zonefile.sh @@ -27,7 +27,7 @@ fi cd "$RESDB_PATH/db/ip" || exit 1 for PFX in $RDNS_PREFIX;do cd "$RESDB_PATH/db/ip/$PFX" 2>/dev/null || continue - IP=$[0x$PFX] + IP=$((0x$PFX)) DOM=$IP.in-addr.arpa RDNS_ZONEFILE="$ZONEFILE_DIR/$DOM" echo -n "generating IPv4 reverse lookup zonefile for $IP/8..." >&2 @@ -45,7 +45,7 @@ for PFX in $RDNS_PREFIX;do a=$(basename $(dirname $i)) b=$(basename $(dirname $(dirname $i))) c=$(basename $(dirname $(dirname $(dirname $i)))) - ipv4=`printf "%d.%d" $[0x${b}] $[0x${c}]` + ipv4=`printf "%d.%d" $((0x$b)) $((0x$c))` printf "%-7s IN NS %s\n" $ipv4 ${f}. done >> "$RDNS_ZONEFILE".tmp mv -f "$RDNS_ZONEFILE".tmp "$RDNS_ZONEFILE" -- cgit v1.2.3