Skip to content

Commit

Permalink
syntax error in dns record change function. fixes #120
Browse files Browse the repository at this point in the history
  • Loading branch information
serghey-rodin committed Mar 7, 2014
1 parent d87f3f6 commit 04e252d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/v-change-dns-record
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

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
Collaborator Author

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.