From 43b1ddd1db4cb4ec77ba4a914908fd57e7b3c755 Mon Sep 17 00:00:00 2001 From: immarvin Date: Fri, 13 Jun 2014 20:13:49 -0700 Subject: [PATCH] replace ifconfig with ip --- xCAT-IBMhpc/share/xcat/IBMhpc/ping-all/ping_all | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/ping-all/ping_all b/xCAT-IBMhpc/share/xcat/IBMhpc/ping-all/ping_all index a8719159f..c9e6992ac 100755 --- a/xCAT-IBMhpc/share/xcat/IBMhpc/ping-all/ping_all +++ b/xCAT-IBMhpc/share/xcat/IBMhpc/ping-all/ping_all @@ -62,7 +62,8 @@ else file=$1 fi -ifconfig -a | grep 'inet ' | awk ' { print $2 } ' | grep -v 127.0.0.1 | +#ifconfig -a | grep 'inet ' | awk ' { print $2 } ' | grep -v 127.0.0.1 | +ip -4 -oneline addr show 2>/dev/null |grep inet | sed -ne "s/.*inet //p"|awk -F ' ' '{print $1}'|awk -F '/' '{print $1}'| while read my_address ; do ##print "checking $my_address" grep -q " ${my_address}$" $file