update startDebugNc.sh script

git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_staging@2330 123451ca-8445-de46-9d55-352943316053
diff --git a/pregelix/pregelix-core/src/main/resources/scripts/startDebugNc.sh b/pregelix/pregelix-core/src/main/resources/scripts/startDebugNc.sh
index 113f401..fe6cf27 100755
--- a/pregelix/pregelix-core/src/main/resources/scripts/startDebugNc.sh
+++ b/pregelix/pregelix-core/src/main/resources/scripts/startDebugNc.sh
@@ -2,7 +2,8 @@
 
 #Get the IP address of the cc
 CCHOST_NAME=`cat conf/master`
-CCHOST=`dig +short $CCHOST_NAME`
+CURRENT_PATH=`pwd`
+CCHOST=`ssh ${CCHOST_NAME} "cd ${CURRENT_PATH}; bin/getip.sh"`
 
 #Import cluster properties
 . conf/cluster.properties
@@ -30,16 +31,7 @@
 export JAVA_HOME=$JAVA_HOME
 
 #Get OS
-OS_NAME=`uname -a|awk '{print $1}'`
-LINUX_OS='Linux'
-
-if [ $OS_NAME = $LINUX_OS ];
-then
-	#Get IP Address
-	IPADDR=`/sbin/ifconfig eth0 | grep "inet addr" | awk '{print $2}' | cut -f 2 -d ':'`
-else
-	IPADDR=`/sbin/ifconfig en1 | grep "inet " | awk '{print $2}' | cut -f 2 -d ':'`
-fi
+IPADDR=`bin/getip.sh`
 
 #Get node ID
 NODEID=`hostname | cut -d '.' -f 1`