From 25171e52b8980538b7b9896db66bc068b94f0e5c Mon Sep 17 00:00:00 2001 From: ligc Date: Thu, 13 Dec 2012 07:21:39 +0000 Subject: [PATCH] fix for bug 3239: do not use one socket connection to send two xcat commands to MN/SN, do not use gettab to get the site.tftpdir for performance consideration git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14640 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/xcataixpost | 38 +++++------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/xCAT/postscripts/xcataixpost b/xCAT/postscripts/xcataixpost index 03975d8ea..c57ff6d43 100755 --- a/xCAT/postscripts/xcataixpost +++ b/xCAT/postscripts/xcataixpost @@ -539,40 +539,12 @@ sub getmypost { } } } - #close $remote; - - #$remote = IO::Socket::SSL->new( - # PeerAddr => $servnode, - # PeerPort => $port, - # Proto => 'tcp', - #); - - if (! defined($TFTPDIR) ) { - print $remote "\n"; - print $remote " gettab\n"; - print $remote " key=tftpdir\n"; - print $remote " site.value\n"; - print $remote "\n"; - - while (<$remote>) { - $response .= $_; - if ($response =~ m/<\/xcatresponse>/) { - $rsp = eval { XMLin($response,SuppressEmpty=>undef,ForceArray=>1) }; - print Dumper($rsp); - if ( ref($rsp) eq "HASH" && exists ( $rsp->{serverdone}) ) { - undef($response); - next; - #last; - } - - $TFTPDIR=$rsp; - last; - - } - } - } close $remote; - + + # If the tftpdir is not /tftpboot, + # should use the -s flag to specify the tftpdir. + # using gettab to get the tftpdir from MN/SN is not efficient + # and has problem with sending multiple commands through one socket connection if( !defined($TFTPDIR) ) { $TFTPDIR="/tftpboot"; }