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

Revision history for this message
Charles Butler (lazypower) wrote :

Reviewers: mp+209137_code.launchpad.net,

Message:
Please take a look.

Description:
replaces charm-helpers-sh call with nslookup

https://code.launchpad.net/~lazypower/charms/precise/nrpe/fix-lp-1287393/+merge/209137

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/69980048/

Affected files (+3, -1 lines):
   A [revision details]
   M hooks/nrpe-relation-joined

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: hooks/nrpe-relation-joined
=== modified file 'hooks/nrpe-relation-joined'
--- hooks/nrpe-relation-joined 2012-07-05 22:22:37 +0000
+++ hooks/nrpe-relation-joined 2014-03-03 22:05:22 +0000
@@ -7,7 +7,7 @@
  . hooks/nrpe.common.bash

  # NRPE requires IP
-address=$(ch_get_ip $(relation-get private-address))
+address=`nslookup $(unit-get private-address) | grep Add | grep -v '#' |
cut -f 2 -d ' '`

  juju-log "Adding $address to allowed_hosts."

« Back to merge proposal