Permalink
Browse files

Fixed bug in getvmip() to return only 1 IP

  • Loading branch information...
1 parent 6c200b5 commit 6b5c40d924246191df910d8fb80eb7261533a799 Khalid Ahmed committed Oct 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/svccontroller.sh
View
4 bin/svccontroller.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
# -------------------------------------------------------------------------- #
# Copyright 2002-2012, Research In Motion Limited #
# #
@@ -22,7 +22,7 @@ getsvcid() {
getvmip() {
if [[ $USE_DDNS == "FALSE" ]]; then
- IP=`onecmd -e $ENDPOINT onevm show $1 | grep IP | tr '=' ' ' | tr ',' ' ' | awk 'NR>1 {print $2}'`
+ IP=`onecmd -e $ENDPOINT onevm show $1 | grep IP | tr '=' ' ' | tr ',' ' ' | awk 'END {print $2}'`
echo $IP
return
fi

0 comments on commit 6b5c40d

Please sign in to comment.