version 1.89, 2003/03/27 17:44:56
|
version 1.90, 2003/04/02 00:44:04
|
|
|
// | // |
// Modified By: Dave Rosckes (rosckes@us.ibm.com) | // Modified By: Dave Rosckes (rosckes@us.ibm.com) |
// | // |
|
// Modified By: Humberto Rivero (hurivero@us.ibm.com) |
|
// |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
| |
|
|
cout << usage << endl; | cout << usage << endl; |
} | } |
| |
|
// |
|
// cimserver_exit: platform specific exit routine calls |
|
// |
|
void cimserver_exit( int rc ){ |
|
#ifdef PEGASUS_OS_OS400 |
|
cimserver_exitRC(rc); |
|
#endif |
|
exit(rc); |
|
} |
|
|
void shutdownCIMOM(Uint32 timeoutValue) | void shutdownCIMOM(Uint32 timeoutValue) |
{ | { |
// | // |
|
|
"Unable to connect to CIM Server. CIM Server may not be running." ); | "Unable to connect to CIM Server. CIM Server may not be running." ); |
// The server job may still be active but not responding. | // The server job may still be active but not responding. |
// Kill the job if it exists. | // Kill the job if it exists. |
cimserver_kill(); |
if(cimserver_kill() == -1) |
exit(1); |
cimserver_exit(2); |
|
cimserver_exit(1); |
#else | #else |
PEGASUS_STD(cerr) << "Unable to connect to CIM Server." << PEGASUS_STD(endl); | PEGASUS_STD(cerr) << "Unable to connect to CIM Server." << PEGASUS_STD(endl); |
PEGASUS_STD(cerr) << "CIM Server may not be running." << PEGASUS_STD(endl); | PEGASUS_STD(cerr) << "CIM Server may not be running." << PEGASUS_STD(endl); |
#endif | #endif |
exit(0); |
cimserver_exit(0); |
} | } |
| |
try | try |
|
|
"Failed to shutdown server: $0", e.getMessage()); | "Failed to shutdown server: $0", e.getMessage()); |
} | } |
// Kill the server job. | // Kill the server job. |
cimserver_kill(); |
if(cimserver_kill() == -1) |
|
cimserver_exit(2); |
#else | #else |
PEGASUS_STD(cerr) << "Failed to shutdown server: "; | PEGASUS_STD(cerr) << "Failed to shutdown server: "; |
if (e.getCode() == CIM_ERR_INVALID_NAMESPACE) | if (e.getCode() == CIM_ERR_INVALID_NAMESPACE) |
|
|
PEGASUS_STD(cerr) << e.getMessage() << PEGASUS_STD(endl); | PEGASUS_STD(cerr) << e.getMessage() << PEGASUS_STD(endl); |
} | } |
#endif | #endif |
exit(1); |
cimserver_exit(1); |
| |
} | } |
catch(Exception& e) | catch(Exception& e) |
|
|
| |
if (running) | if (running) |
{ | { |
cimserver_kill(); |
int kill_rc = cimserver_kill(); |
|
#ifdef PEGASUS_OS_OS400 |
|
if(kill_rc == -1) |
|
cimserver_exit(2); |
|
cimserver_exit(1); |
|
#endif |
} | } |
} | } |
//catch(Exception& e) | //catch(Exception& e) |
|
|
#else | #else |
cout << "CIM Server stopped." << endl; | cout << "CIM Server stopped." << endl; |
#endif | #endif |
exit(0); |
cimserver_exit(0); |
} | } |
| |
// Leave this in until people get familiar with the logs. | // Leave this in until people get familiar with the logs. |