Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Host name with no prefix breaks some commands #20

Closed
drodrig opened this Issue Jul 6, 2014 · 1 comment

Comments

2 participants

drodrig commented Jul 6, 2014

This command works:
./rsdns-a.sh -n www.domain.com -i 1.1.1.1 -t 300 -U

This command does does not (note the absent prefix from the host name):
./rsdns-a.sh -n domain.com -i 1.1.1.1 -t 300 -U

Instead, it returns:
"Domain com not found."

I added this to lib/func.sh (get_domain() - line 97):

    97       # Added to account for domains like "this.com" (with no host prefix).
   98       DOTCOUNT=``grep -o -e '\\.' <<<$1 | wc -l` `
   99       if [ $DOTCOUNT -eq 1 ]
  100          then
  101              HOST=$1
  102              DOMAIN=$1
  103              return
  104      fi

Now the above command seems to work. I'm not a shell programmer and I didn't test thoroughly, so I probably broke something else :-).

Owner

linickx commented Jul 7, 2014

I think this was fixed by issue #2 .... I'll update the REAME.md.

@linickx linickx closed this in 4e582a2 Jul 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment