Fix bug whit ns records in idn domains

This will fix https://github.com/serghey-rodin/vesta/issues/845

Named wont start whit unicode charcters and return:

zone example.com/IN: loaded serial 2016100705
dns_rdata_fromtext: /home/admin/conf/dns/españa.es.db:18: near 'ns2.españa.com.': bad name (check-names)
zone xn--espaa-rta.es/IN: loading from master file /home/admin/conf/dns/españa.es.db failed: bad name (check-names)
This commit is contained in:
Skamasle 2016-10-07 19:58:35 +02:00 committed by GitHub
parent 8cabb5414a
commit 0c98233f2e

View file

@ -18,7 +18,7 @@ domain=$2
record=$(idn -t --quiet -u "$3" ) record=$(idn -t --quiet -u "$3" )
record=$(echo "$record" | tr '[:upper:]' '[:lower:]') record=$(echo "$record" | tr '[:upper:]' '[:lower:]')
rtype=$(echo "$4"| tr '[:lower:]' '[:upper:]') rtype=$(echo "$4"| tr '[:lower:]' '[:upper:]')
dvalue=$(idn -t --quiet -u "$5" ) dvalue=$(idn -t --quiet -a "$5" )
priority=$6 priority=$6
id=$7 id=$7
restart=$8 restart=$8