File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ if [ "$rtype" != 'MX' ] && [ "$rtype" != 'SRV' ]; then
3939fi
4040
4141# Add trailing dot at the end of NS/CNAME/MX/PTR/SRV record
42- fqdn_type=$( echo $rtype | grep " NS\|CNAME\|MX\|PTR\|SRV" )
43- if [ ! -z " $fqdn_type " ]; then
42+ if [[ $rtype =~ NS| CNAME| MX| PTR| SRV ]]; then
4443 trailing_dot=$( echo $dvalue | grep " \.$" )
4544 if [ -z $trailing_dot ]; then
4645 dvalue=" $dvalue ."
Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ if [ "$TYPE" != 'MX' ] && [ "$TYPE" != 'SRV' ]; then
5454fi
5555
5656# Add trailing dot at the end of NS/CNAME/MX/PTR/SRV record
57- fqdn_type=$( echo $TYPE | grep " NS\|CNAME\|MX\|PTR\|SRV" )
58- if [ ! -z " $fqdn_type " ]; then
57+ if [[ $TYPE =~ NS| CNAME| MX| PTR| SRV ]]; then
5958 trailing_dot=$( echo $dvalue | grep " \.$" )
6059 if [ -z $trailing_dot ]; then
6160 dvalue=" $dvalue ."
You can’t perform that action at this time.
0 commit comments