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"; }