version 1.229, 2009/01/21 01:37:17
|
version 1.240, 2011/12/21 12:32:07
|
|
|
#include <Service/ServerRunStatus.h> | #include <Service/ServerRunStatus.h> |
| |
#if defined(PEGASUS_OS_ZOS) | #if defined(PEGASUS_OS_ZOS) |
#include <Pegasus/Common/SetFileDescriptorToEBCDICEncoding.h> |
#include <Pegasus/General/SetFileDescriptorToEBCDICEncoding.h> |
#include <Service/ARM_zOS.h> | #include <Service/ARM_zOS.h> |
|
#include <Service/TimeZone_zOS.h> |
|
#include <Service/WaitForTCPIP_zOS.h> |
# ifdef PEGASUS_ZOS_SECURITY | # ifdef PEGASUS_ZOS_SECURITY |
// This include file will not be provided in the OpenGroup CVS for now. | // This include file will not be provided in the OpenGroup CVS for now. |
// Do NOT try to include it in your compile | // Do NOT try to include it in your compile |
|
|
| |
//Windows service variables are not defined elsewhere in the product | //Windows service variables are not defined elsewhere in the product |
//enable ability to override these | //enable ability to override these |
|
#ifndef PEGASUS_FLAVOR |
#ifndef PEGASUS_SERVICE_NAME | #ifndef PEGASUS_SERVICE_NAME |
#define PEGASUS_SERVICE_NAME "Pegasus CIM Object Manager"; | #define PEGASUS_SERVICE_NAME "Pegasus CIM Object Manager"; |
#endif | #endif |
#ifndef PEGASUS_SERVICE_DESCRIPTION | #ifndef PEGASUS_SERVICE_DESCRIPTION |
#define PEGASUS_SERVICE_DESCRIPTION "Pegasus CIM Object Manager Service"; | #define PEGASUS_SERVICE_DESCRIPTION "Pegasus CIM Object Manager Service"; |
#endif | #endif |
|
#else |
|
#ifndef PEGASUS_SERVICE_NAME |
|
#define PEGASUS_SERVICE_NAME PEGASUS_FLAVOR " Pegasus CIM Object Manager" |
|
#endif |
|
#ifndef PEGASUS_SERVICE_DESCRIPTION |
|
#define PEGASUS_SERVICE_DESCRIPTION PEGASUS_FLAVOR \ |
|
" Pegasus CIM Object Manager Service"; |
|
#endif |
|
#endif |
| |
#ifdef PEGASUS_OS_PASE | #ifdef PEGASUS_OS_PASE |
#include <as400_protos.h> //for _SETCCSID | #include <as400_protos.h> //for _SETCCSID |
|
|
Thread::clearLanguages(); | Thread::clearLanguages(); |
delete dummyInitialThread; | delete dummyInitialThread; |
} | } |
|
_serverRunStatus.setServerNotRunning(); |
} | } |
| |
// | // |
|
|
| |
#endif /* PEGASUS_ENABLE_PRIVILEGE_SEPARATION */ | #endif /* PEGASUS_ENABLE_PRIVILEGE_SEPARATION */ |
| |
|
static void _initConfigProperty(const String &propName, Uint32 value) |
|
{ |
|
char strValue[22]; |
|
Uint32 n; |
|
const char *startP = Uint32ToString( |
|
strValue, |
|
value, |
|
n); |
|
ConfigManager::getInstance()->initCurrentValue(propName, String(startP, n)); |
|
} |
|
|
///////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////// |
// MAIN | // MAIN |
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// |
|
|
} | } |
// Need to initialize timezone information in the | // Need to initialize timezone information in the |
// initial processing thread (IPT) | // initial processing thread (IPT) |
tzset(); |
initialize_zOS_timezone(); |
#endif | #endif |
| |
#if defined(PEGASUS_OS_AIX) && defined(PEGASUS_HAS_MESSAGES) | #if defined(PEGASUS_OS_AIX) && defined(PEGASUS_HAS_MESSAGES) |
|
|
// | // |
if (shutdownOption) | if (shutdownOption) |
{ | { |
|
#if defined(PEGASUS_OS_ZOS) && defined(PEGASUS_ZOS_SECURITY) |
|
// This checks whether user is authorized to stop the |
|
// CIM Server. When unauthorized a message is logged to |
|
// to the user and program exits. |
|
shutdownCheckProfileCIMSERVclassWBEM(); |
|
// Depending on the success of the previous check we may not |
|
// reach this code!!! |
|
#endif |
String configTimeout = | String configTimeout = |
configManager->getCurrentValue("shutdownTimeout"); | configManager->getCurrentValue("shutdownTimeout"); |
Uint32 timeoutValue = | Uint32 timeoutValue = |
|
|
return 1; | return 1; |
} | } |
| |
#if defined(PEGASUS_OS_ZOS) && defined(PEGASUS_ZOS_SECURITY) |
#if defined(PEGASUS_OS_ZOS) |
|
# if defined(PEGASUS_ZOS_SECURITY) |
startupCheckBPXServer(true); | startupCheckBPXServer(true); |
startupCheckProfileCIMSERVclassWBEM(); | startupCheckProfileCIMSERVclassWBEM(); |
startupEnableMSC(); | startupEnableMSC(); |
#endif | #endif |
|
startupWaitForTCPIP(); |
|
#endif |
| |
#if defined(PEGASUS_DEBUG) | #if defined(PEGASUS_DEBUG) |
// Put out startup up message. | // Put out startup up message. |
|
|
} | } |
else | else |
{ | { |
MessageLoaderParms parms( |
PEG_TRACE_CSTRING(TRC_SERVER,Tracer::LEVEL4, |
"src.Server.cimserver.IPV6_STACK_NOT_ACTIVE", |
|
"IPv6 stack is not active, using IPv4 socket."); | "IPv6 stack is not active, using IPv4 socket."); |
Logger::put_l( |
|
Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
parms); |
|
#if defined(PEGASUS_DEBUG) |
|
cout << MessageLoader::getMessage(parms) << endl; |
|
#endif |
|
} | } |
#endif | #endif |
if (!addIP6Acceptor) | if (!addIP6Acceptor) |
|
|
// | // |
portNumberHttp = System::lookupPort( | portNumberHttp = System::lookupPort( |
WBEM_HTTP_SERVICE_NAME, WBEM_DEFAULT_HTTP_PORT); | WBEM_HTTP_SERVICE_NAME, WBEM_DEFAULT_HTTP_PORT); |
|
_initConfigProperty("httpPort", portNumberHttp); |
} | } |
else | else |
{ | { |
|
|
// | // |
portNumberHttps = System::lookupPort( | portNumberHttps = System::lookupPort( |
WBEM_HTTPS_SERVICE_NAME, WBEM_DEFAULT_HTTPS_PORT); | WBEM_HTTPS_SERVICE_NAME, WBEM_DEFAULT_HTTPS_PORT); |
|
_initConfigProperty("httpsPort", portNumberHttps); |
} | } |
else | else |
{ | { |
|
|
parms); | parms); |
cerr << MessageLoader::getMessage(parms) << endl; | cerr << MessageLoader::getMessage(parms) << endl; |
| |
|
deleteCIMServer(); |
|
|
// | // |
// notify parent process (if there is a parent process) to terminate | // notify parent process (if there is a parent process) to terminate |
// | // |
if (daemonOption) | if (daemonOption) |
_cimServerProcess->notify_parent(1); | _cimServerProcess->notify_parent(1); |
| |
deleteCIMServer(); |
|
return 1; | return 1; |
} | } |
| |
|
|
#ifdef PEGASUS_ENABLE_SLP | #ifdef PEGASUS_ENABLE_SLP |
_cimServer->startSLPProvider(); | _cimServer->startSLPProvider(); |
#endif | #endif |
|
_cimServer->initComplete(); |
|
|
// | // |
// Loop to call CIMServer's runForever() method until CIMServer | // Loop to call CIMServer's runForever() method until CIMServer |
// has been shutdown | // has been shutdown |