version 1.142, 2005/01/03 11:00:01
|
version 1.147, 2005/01/29 06:23:55
|
|
|
// | // |
// Modified By: Amit K Arora, IBM (amitarora@in.ibm.com) - pep 167 | // Modified By: Amit K Arora, IBM (amitarora@in.ibm.com) - pep 167 |
// | // |
|
// Modified By: Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#2555 |
|
// |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
| |
|
|
usage.append (" - sets CIM Server configuration property\n"); | usage.append (" - sets CIM Server configuration property\n"); |
| |
cout << endl; | cout << endl; |
#if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) |
cout << PEGASUS_PRODUCT_NAME << " " << PEGASUS_PRODUCT_VERSION << endl; |
cout << PLATFORM_PRODUCT_NAME << " " << PLATFORM_PRODUCT_VERSION << endl; |
|
#else |
|
cout << PEGASUS_NAME << PEGASUS_VERSION << endl; |
|
#endif |
|
cout << endl; | cout << endl; |
| |
#if defined(PEGASUS_OS_TYPE_WINDOWS) | #if defined(PEGASUS_OS_TYPE_WINDOWS) |
|
|
} | } |
else if(String::equal(arg,"--version")) | else if(String::equal(arg,"--version")) |
{ | { |
#if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) |
cout << PEGASUS_PRODUCT_VERSION << endl; |
cout << PLATFORM_PRODUCT_VERSION << endl; |
|
#else |
|
cout << PEGASUS_VERSION << endl; |
|
#endif |
|
exit(0); | exit(0); |
} | } |
// Check for -option | // Check for -option |
|
|
if (*option == OPTION_VERSION && | if (*option == OPTION_VERSION && |
strlen(option) == 1) | strlen(option) == 1) |
{ | { |
#if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) |
cout << PEGASUS_PRODUCT_VERSION << endl; |
cout << PLATFORM_PRODUCT_VERSION << endl; |
|
#else |
|
cout << PEGASUS_VERSION << endl; |
|
#endif |
|
exit(0); | exit(0); |
} | } |
// | // |
|
|
#endif | #endif |
} | } |
| |
Uint32 portNumberHttps; |
Uint32 portNumberHttps=0; |
Uint32 portNumberHttp; |
Uint32 portNumberHttp=0; |
Uint32 portNumberExportHttps; |
Uint32 portNumberExportHttps=0; |
| |
if (enableHttpsConnection) | if (enableHttpsConnection) |
{ | { |
|
|
CString portString = httpsPort.getCString(); | CString portString = httpsPort.getCString(); |
char* end = 0; | char* end = 0; |
Uint32 port = strtol(portString, &end, 10); | Uint32 port = strtol(portString, &end, 10); |
assert(end != 0 && *end == '\0'); |
if(!(end != 0 && *end == '\0')) |
|
{ |
|
PEGASUS_STD(cerr) << "Bad HTTPS Port Value" << PEGASUS_STD(endl); |
|
exit(1); |
|
} |
|
|
| |
// | // |
// Look up the WBEM-HTTPS port number | // Look up the WBEM-HTTPS port number |
|
|
CString portString = httpPort.getCString(); | CString portString = httpPort.getCString(); |
char* end = 0; | char* end = 0; |
Uint32 port = strtol(portString, &end, 10); | Uint32 port = strtol(portString, &end, 10); |
assert(end != 0 && *end == '\0'); |
if(!(end != 0 && *end == '\0')) |
|
{ |
|
PEGASUS_STD(cerr) << "Bad HTTP Port Value" << PEGASUS_STD(endl); |
|
exit(1); |
|
} |
// | // |
// Look up the WBEM-HTTP port number | // Look up the WBEM-HTTP port number |
// | // |
|
|
} | } |
#if defined(PEGASUS_DEBUG) | #if defined(PEGASUS_DEBUG) |
// Put out startup up message. | // Put out startup up message. |
cout << PEGASUS_NAME << PEGASUS_VERSION << endl; |
cout << PEGASUS_PRODUCT_NAME << " " << PEGASUS_PRODUCT_VERSION << endl; |
//l10n | //l10n |
//cout << "Built " << __DATE__ << " " << __TIME__ << endl; | //cout << "Built " << __DATE__ << " " << __TIME__ << endl; |
//cout <<"Starting..." | //cout <<"Starting..." |
|
|
| |
| |
| |
#if defined(PEGASUS_USE_23HTTPMONITOR_SERVER) |
Monitor monitor; |
Monitor monitor(true); |
|
CIMServer server(&monitor); | CIMServer server(&monitor); |
#else |
|
monitor_2 monitor; |
|
CIMServer server(&monitor); |
|
#endif |
|
| |
CimserverHolder cimserverHolder( &server ); | CimserverHolder cimserverHolder( &server ); |
| |
|
|
#endif | #endif |
| |
// Put server started message to the logger | // Put server started message to the logger |
#if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) |
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, |
//l10n |
Logger::INFORMATION, |
//Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
//"Started $0 version $1.", |
|
//PLATFORM_PRODUCT_NAME, PLATFORM_PRODUCT_VERSION); |
|
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
"src.Server.cimserver.STARTED_VERSION", |
|
"Started $0 version $1.", |
|
PLATFORM_PRODUCT_NAME, PLATFORM_PRODUCT_VERSION); |
|
#else |
|
//l10n |
|
//Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
//"Started $0 version $1.", |
|
//PEGASUS_NAME, PEGASUS_VERSION); |
|
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
"src.Server.cimserver.STARTED_VERSION", | "src.Server.cimserver.STARTED_VERSION", |
"Started $0 version $1.", | "Started $0 version $1.", |
PEGASUS_NAME, PEGASUS_VERSION); |
PEGASUS_PRODUCT_NAME, PEGASUS_PRODUCT_VERSION); |
#endif |
|
|
|
| |
// | // |
// Loop to call CIMServer's runForever() method until CIMServer | // Loop to call CIMServer's runForever() method until CIMServer |
|
|
// | // |
// normal termination | // normal termination |
// | // |
|
|
// Put server shutdown message to the logger | // Put server shutdown message to the logger |
#if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) |
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, |
//l10n |
Logger::INFORMATION, "src.Server.cimserver.STOPPED", |
//Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
"$0 stopped.", PEGASUS_PRODUCT_NAME); |
//"$0 stopped.", PLATFORM_PRODUCT_NAME); |
|
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
"src.Server.cimserver.STOPPED", |
|
"$0 stopped.", PLATFORM_PRODUCT_NAME); |
|
#else |
|
//l10n |
|
//Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
//"$0 stopped.", PEGASUS_NAME); |
|
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION, |
|
"src.Server.cimserver.STOPPED", |
|
"$0 stopped.", PEGASUS_NAME); |
|
#endif |
|
| |
#if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) || defined(PEGASUS_OS_AIX) || defined(PEGASUS_PLATFORM_SOLARIS_SPARC_CC) | #if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) || defined(PEGASUS_OS_AIX) || defined(PEGASUS_PLATFORM_SOLARIS_SPARC_CC) |
// | // |