Skip to content

Commit

Permalink
Merge pull request #441 from eile/master
Browse files Browse the repository at this point in the history
Fix ssh launch code on Linux
  • Loading branch information
eile committed May 12, 2015
2 parents a156cb9 + 0b5e4bc commit 4d00465
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions eq/server/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
#include <lunchbox/os.h>
#include <lunchbox/sleep.h>

#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>

namespace eq
{
namespace server
Expand Down Expand Up @@ -405,13 +408,14 @@ std::string Node::_createRemoteCommand() const
if( program.empty( ))
{
LBWARN << "No render client name, auto-launch will fail" << std::endl;
return std::string();
return program;
}

//----- environment
std::ostringstream stringStream;
const char quote = getCAttribute( CATTR_LAUNCH_COMMAND_QUOTE );

//----- program + args
#ifndef WIN32
# ifdef Darwin
const char libPath[] = "DYLD_LIBRARY_PATH";
Expand All @@ -438,23 +442,16 @@ std::string Node::_createRemoteCommand() const
stringStream << "LB_LOG_LEVEL=" <<lunchbox::Log::getLogLevelString() << " ";
if( lunchbox::Log::topics != 0 )
stringStream << "LB_LOG_TOPICS=" <<lunchbox::Log::topics << " ";

#endif // WIN32
const boost::filesystem::path absolute =
boost::filesystem::system_complete( boost::filesystem::path( program ));
program = absolute.native();

//----- program + args
const std::string& workDir = config->getWorkDir();
#ifdef WIN32
LBASSERT( program.length() > 2 );
if( !( program[1] == ':' && (program[2] == '/' || program[2] == '\\' )) &&
// !( drive letter and full path present )
!( program[0] == '/' || program[0] == '\\' ))
// !full path without drive letter
{
program = workDir + '/' + program; // add workDir to relative path
}
#endif

const std::string ownData = getServer()->serialize();
const std::string remoteData = _node->serialize();
const std::string& ownData = getServer()->serialize();
const std::string& remoteData = _node->serialize();
const std::string& workDir = config->getWorkDir();
std::string collageGlobals;
co::Global::toString( collageGlobals );

Expand Down

0 comments on commit 4d00465

Please sign in to comment.