Reinstate coriolis_top system path
This commit is contained in:
parent
d373afeffd
commit
d7652a7ebc
|
@ -106,7 +106,7 @@ namespace {
|
||||||
{
|
{
|
||||||
Utilities::Path stratusMappingName ( p->asString() );
|
Utilities::Path stratusMappingName ( p->asString() );
|
||||||
if ( not stratusMappingName.absolute() ) {
|
if ( not stratusMappingName.absolute() ) {
|
||||||
stratusMappingName = System::getPath("etc") / stratusMappingName;
|
stratusMappingName = System::getPath("coriolis_top") / stratusMappingName;
|
||||||
}
|
}
|
||||||
setenv ( "STRATUS_MAPPING_NAME", stratusMappingName.toString().c_str(), 1 );
|
setenv ( "STRATUS_MAPPING_NAME", stratusMappingName.toString().c_str(), 1 );
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,7 @@ namespace {
|
||||||
std::string environmentMapper ( std::string environmentName )
|
std::string environmentMapper ( std::string environmentName )
|
||||||
{
|
{
|
||||||
if ( environmentName == "STRATUS_MAPPING_NAME" ) return "stratus_mapping_name";
|
if ( environmentName == "STRATUS_MAPPING_NAME" ) return "stratus_mapping_name";
|
||||||
|
if ( environmentName == "CORIOLIS_TOP" ) return "coriolis_top";
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,9 +250,13 @@ namespace CRL {
|
||||||
|| ( signal(SIGSEGV, System::_trapSig) == SIG_ERR ) )
|
|| ( signal(SIGSEGV, System::_trapSig) == SIG_ERR ) )
|
||||||
System::_trapSig ( SIGTFLT );
|
System::_trapSig ( SIGTFLT );
|
||||||
|
|
||||||
|
const char* coriolis_top = getenv("CORIOLIS_TOP");
|
||||||
|
|
||||||
// Environment variables reading.
|
// Environment variables reading.
|
||||||
boptions::options_description options ("Environment Variables");
|
boptions::options_description options ("Environment Variables");
|
||||||
options.add_options()
|
options.add_options()
|
||||||
|
( "coriolis_top", boptions::value<string>()->default_value(coriolis_top)
|
||||||
|
, "Location of Corilois module." )
|
||||||
( "stratus_mapping_name", boptions::value<string>()
|
( "stratus_mapping_name", boptions::value<string>()
|
||||||
, "Stratus virtual cells mapping." );
|
, "Stratus virtual cells mapping." );
|
||||||
|
|
||||||
|
@ -259,6 +264,10 @@ namespace CRL {
|
||||||
boptions::store ( boptions::parse_environment(options,environmentMapper), arguments );
|
boptions::store ( boptions::parse_environment(options,environmentMapper), arguments );
|
||||||
boptions::notify ( arguments );
|
boptions::notify ( arguments );
|
||||||
|
|
||||||
|
if ( arguments.count("coriolis_top") ) {
|
||||||
|
_pathes.insert ( make_pair("coriolis_top", arguments["coriolis_top"].as<string>()) );
|
||||||
|
}
|
||||||
|
|
||||||
Cfg::Configuration::get ();
|
Cfg::Configuration::get ();
|
||||||
|
|
||||||
Cfg::getParamBool ("misc.catchCore" ,false )->registerCb ( this, catchCoreChanged );
|
Cfg::getParamBool ("misc.catchCore" ,false )->registerCb ( this, catchCoreChanged );
|
||||||
|
|
Loading…
Reference in New Issue