version 1.1, 2001/04/15 17:58:58
|
version 1.3, 2001/04/24 01:50:15
|
|
|
| |
String configFile = pegasusHome + "/cimserver.conf"; | String configFile = pegasusHome + "/cimserver.conf"; |
| |
if (!FileSystem::exists(configFile)) |
if (FileSystem::exists(configFile)) |
{ |
|
cerr << argv[0] << ": cannot open " << configFile << endl; |
|
exit(1); |
|
} |
|
|
|
om.mergeFile(configFile); | om.mergeFile(configFile); |
| |
om.mergeCommandLine(argc, argv); | om.mergeCommandLine(argc, argv); |
|
|
om.checkRequiredOptions(); | om.checkRequiredOptions(); |
} | } |
| |
|
void PrintHelp(const char* arg0) |
|
{ |
|
cout << '\n'; |
|
cout << PEGASUS_VERSION << endl; |
|
cout << '\n'; |
|
cout << "Usage: " << arg0 << " [-port <port_num> -t -h -v]\n"; |
|
cout << '\n'; |
|
cout << " -h - prints this help message\n"; |
|
cout << " -port - specifies port number to listen on\n"; |
|
cout << " -v - prints out the version number\n"; |
|
cout << " -t - turns on trace mode\n"; |
|
cout << endl; |
|
} |
|
|
int main(int argc, char** argv) | int main(int argc, char** argv) |
{ | { |
// Get environment variables: | // Get environment variables: |
|
|
| |
if (om.lookupValue("help", helpOption) && helpOption == "true") | if (om.lookupValue("help", helpOption) && helpOption == "true") |
{ | { |
cerr << "No help yet!" << endl; |
PrintHelp(argv[0]); |
exit(0); | exit(0); |
} | } |
| |