ORiON suggested a better way to check FQDN records

This commit is contained in:
Serghey Rodin 2014-03-23 15:44:30 +02:00
commit 3587976f2a
2 changed files with 2 additions and 4 deletions

View file

@ -54,8 +54,7 @@ if [ "$TYPE" != 'MX' ] && [ "$TYPE" != 'SRV' ]; then
fi
# Add trailing dot at the end of NS/CNAME/MX/PTR/SRV record
fqdn_type=$(echo $TYPE | grep "NS\|CNAME\|MX\|PTR\|SRV")
if [ ! -z "$fqdn_type" ]; then
if [[ $TYPE =~ NS|CNAME|MX|PTR|SRV ]]; then
trailing_dot=$(echo $dvalue | grep "\.$")
if [ -z $trailing_dot ]; then
dvalue="$dvalue."