Code review comment for lp:~lazypower/charms/precise/nrpe/fix-lp-1287393

Revision history for this message
Matt Bruzek (mbruzek) wrote :

I have a comment/question about the new command you are using.
File hooks/nrpe-relation-joined (right):
hooks/nrpe-relation-joined:10: address=`nslookup $(unit-get
private-address) | grep Add | grep -v '#' | cut -f 2 -d ' '`
I ran this nslookup command on my own system and I believe the two greps
are cancelling each out.

$ nslookup

** server can't find NXDOMAIN

$ nslookup | grep Add

$ nslookup | grep Add | grep -v '#'
(no match)

Are you sure this command works in all cases? Am I using the command
incorrectly here, or should we consider refining the command to work in
this case too?

« Back to merge proposal