From 6c1a840369d4fa6ed1b93c4c385f026ea8d4b4cc Mon Sep 17 00:00:00 2001 From: linggao Date: Tue, 19 Mar 2013 21:17:46 +0000 Subject: [PATCH] fixed SF bug#2433 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15590 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcatdsklspost | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 436f5a4f0..21465a53b 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -344,7 +344,12 @@ rm -rf /xcatpost/mypostscript #get node name and download the mypostscript.$node file #try to get the node ip address that connects to the server. #then resolve the name of the ip -NIP=`ip route get $SIP | head -n 1 | sed 's/^.*src//g' | awk {'print $1'}` +real_SIP=`getent hosts $SIP |awk {'print $1'}` +if [ $? -ne 0 ]; then + real_SIP=$SIP +fi + +NIP=`ip route get $real_SIP | head -n 1 | sed 's/^.*src//g' | awk {'print $1'}` if [ $? -eq 0 ] && [ -n "$NIP" ]; then #relsove the name of the node from ip address result=`getent hosts $NIP` @@ -375,12 +380,13 @@ fi max_retries=2 postfix=0 if [ -n "$node_short" ]; then - download_mypostscript $SIP $node_short $postfix $max_retries $TFTPDIR - if [ $? -ne 0 ]; then - if [ "$node" != "$node_short" ]; then - download_mypostscript $SIP $node $postfix $max_retries $TFTPDIR - fi - fi + download_mypostscript $SIP $node_short $postfix $max_retries $TFTPDIR + #disable trying the long node name for now + #if [ $? -ne 0 ]; then + # if [ "$node" != "$node_short" ]; then + # download_mypostscript $SIP $node $postfix $max_retries $TFTPDIR + # fi + #fi fi