Skip to content
Permalink
Browse files
syntax error in dns record change function. fixes #120
  • Loading branch information
serghey-rodin committed Mar 7, 2014
1 parent d87f3f6 commit 04e252d75ce38033d0476df75593380e69391fbc
Showing 1 changed file with 1 addition and 1 deletion.
@@ -54,7 +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]")
fqdn_type=$(echo $TYPE | grep "NS\|CNAME\|MX\|PTR\|SRV")
if [ ! -z "$fqdn_type" ]; then
trailing_dot=$(echo $dvalue | grep "\.$")
if [ -z $trailing_dot ]; then

2 comments on commit 04e252d

@ORiON-
Copy link

@ORiON- ORiON- commented on 04e252d Mar 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was about commiting a fix, and than i saw that the 'master' has already got a fix for that.
Anyway, grep -E "NS|CNAME|MX|PTR|SRV" looks better.

But, why not make it look even better? (:
You can combine the 'grep' with the 'if' together like this:
if [[ $TYPE =~ NS|CNAME|MX|PTR|SRV ]]; then

@serghey-rodin
Copy link
Owner Author

@serghey-rodin serghey-rodin commented on 04e252d Mar 23, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, why not? Thank you :)
3587976

Please sign in to comment.