version 1.15, 2008/12/02 09:00:13
|
version 1.15.2.1, 2010/05/21 08:56:20
|
|
|
* passed through to CIMSERVERMAIN). | * passed through to CIMSERVERMAIN). |
*/ | */ |
| |
if (!options.version && |
if (!options.version && !options.help) |
!options.help && |
{ |
TestProcessRunning(PEGASUS_CIMSERVER_START_FILE, CIMSERVERMAIN) == 0) |
int isRunning = (TestProcessRunning( |
|
PEGASUS_CIMSERVER_START_FILE, CIMSERVERMAIN) == 0); |
|
if (options.status) |
|
{ |
|
if (isRunning) |
|
{ |
|
fprintf(stderr, "CIM Server is running.\n"); |
|
exit(0); |
|
} |
|
else |
|
{ |
|
fprintf(stderr, "CIM Server is not running.\n"); |
|
exit(2); |
|
} |
|
} |
|
else if (isRunning) |
{ | { |
fprintf(stderr, | fprintf(stderr, |
"%s: cimserver is already running (the PID found in the file " | "%s: cimserver is already running (the PID found in the file " |
"\"%s\" corresponds to an existing process named \"%s\").\n\n", | "\"%s\" corresponds to an existing process named \"%s\").\n\n", |
globals.argv[0], PEGASUS_CIMSERVER_START_FILE, CIMSERVERMAIN); | globals.argv[0], PEGASUS_CIMSERVER_START_FILE, CIMSERVERMAIN); |
|
|
exit(1); | exit(1); |
} | } |
|
} |
| |
/* Get enableAuthentication configuration option. */ | /* Get enableAuthentication configuration option. */ |
| |