version 1.137, 2004/06/29 16:43:36
|
version 1.141, 2004/10/17 20:40:39
|
|
|
//%2003//////////////////////////////////////////////////////////////////////// |
//%2004//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems. |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; | // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
// IBM Corp.; EMC Corporation, The Open Group. | // IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
usage.append (" -v - displays CIM Server version number\n"); | usage.append (" -v - displays CIM Server version number\n"); |
usage.append (" -h - prints this help message\n"); | usage.append (" -h - prints this help message\n"); |
usage.append (" -s - shuts down CIM Server\n"); | usage.append (" -s - shuts down CIM Server\n"); |
#if !defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) |
#if !defined(PEGASUS_USE_RELEASE_DIRS) |
usage.append (" -D [home] - sets pegasus home directory\n"); | usage.append (" -D [home] - sets pegasus home directory\n"); |
#endif | #endif |
#if defined(PEGASUS_OS_TYPE_WINDOWS) | #if defined(PEGASUS_OS_TYPE_WINDOWS) |
|
|
usage.append (" -v - displays CIM Server version number\n"); | usage.append (" -v - displays CIM Server version number\n"); |
usage.append (" -h - prints this help message\n"); | usage.append (" -h - prints this help message\n"); |
usage.append (" -s - shuts down CIM Server\n"); | usage.append (" -s - shuts down CIM Server\n"); |
#if !defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) |
#if !defined(PEGASUS_USE_RELEASE_DIRS) |
//usage.append (" -D [home] - sets pegasus home directory\n"); |
usage.append (" -D [home] - sets pegasus home directory\n"); |
usage.append("$0"); |
|
#endif | #endif |
#if defined(PEGASUS_OS_TYPE_WINDOWS) | #if defined(PEGASUS_OS_TYPE_WINDOWS) |
usage.append (" -install [name] - installs pegasus as a Windows NT Service\n"); | usage.append (" -install [name] - installs pegasus as a Windows NT Service\n"); |
|
|
| |
#if defined(PEGASUS_OS_TYPE_WINDOWS) | #if defined(PEGASUS_OS_TYPE_WINDOWS) |
MessageLoaderParms parms("src.Server.cimserver.MENU.WINDOWS", usage); | MessageLoaderParms parms("src.Server.cimserver.MENU.WINDOWS", usage); |
#elif defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) |
#elif defined(PEGASUS_OS_USE_RELEASE_DIRS) |
MessageLoaderParms parms("src.Server.cimserver.MENU.HPUXLINUXIA64GNU", usage); | MessageLoaderParms parms("src.Server.cimserver.MENU.HPUXLINUXIA64GNU", usage); |
#else | #else |
MessageLoaderParms parms("src.Server.cimserver.MENU.STANDARD", usage); | MessageLoaderParms parms("src.Server.cimserver.MENU.STANDARD", usage); |
#endif | #endif |
//cout << usage << endl; |
|
cout << MessageLoader::getMessage(parms) << endl; | cout << MessageLoader::getMessage(parms) << endl; |
} | } |
| |
|
|
MessageLoader::_useProcessLocale = true; | MessageLoader::_useProcessLocale = true; |
//l10n | //l10n |
| |
|
//l10n |
|
#if defined(PEGASUS_OS_AIX) && defined(PEGASUS_HAS_MESSAGES) |
|
setlocale(LC_ALL, ""); |
|
#endif |
|
|
#ifdef PEGASUS_OS_OS400 | #ifdef PEGASUS_OS_OS400 |
| |
VFYPTRS_INCDCL; // VFYPTRS local variables | VFYPTRS_INCDCL; // VFYPTRS local variables |
|
|
#else | #else |
#if defined(PEGASUS_OS_AIX) && defined(PEGASUS_USE_RELEASE_DIRS) | #if defined(PEGASUS_OS_AIX) && defined(PEGASUS_USE_RELEASE_DIRS) |
pegasusHome = AIX_RELEASE_PEGASUS_HOME; | pegasusHome = AIX_RELEASE_PEGASUS_HOME; |
#else |
#elif !defined(PEGASUS_USE_RELEASE_DIRS) |
const char* tmp = getenv("PEGASUS_HOME"); | const char* tmp = getenv("PEGASUS_HOME"); |
| |
if (tmp) | if (tmp) |
|
|
PrintHelp(argv[0]); | PrintHelp(argv[0]); |
exit(0); | exit(0); |
} | } |
#if !defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) |
#if !defined(PEGASUS_USE_RELEASE_DIRS) |
else if (*option == OPTION_HOME && | else if (*option == OPTION_HOME && |
(strlen(option) == 1)) | (strlen(option) == 1)) |
{ | { |
|
|
#endif | #endif |
} | } |
| |
|
#if defined(PEGASUS_DEBUG) |
// Leave this in until people get familiar with the logs. | // Leave this in until people get familiar with the logs. |
#if !defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) && \ |
|
!defined(PEGASUS_OS_OS400) |
|
//l10n | //l10n |
//cout << "Logs Directory = " << logsDirectory << endl; | //cout << "Logs Directory = " << logsDirectory << endl; |
MessageLoaderParms parms("src.Server.cimserver.LOGS_DIRECTORY", | MessageLoaderParms parms("src.Server.cimserver.LOGS_DIRECTORY", |
"Logs Directory = "); | "Logs Directory = "); |
cout << MessageLoader::getMessage(parms) << logsDirectory << endl; | cout << MessageLoader::getMessage(parms) << logsDirectory << endl; |
#endif | #endif |
|
|
|
|
} | } |
catch (UnrecognizedConfigProperty& e) | catch (UnrecognizedConfigProperty& e) |
{ | { |
|
|
return(1); | return(1); |
} | } |
} | } |
|
#if defined(PEGASUS_DEBUG) |
// Put out startup up message. | // Put out startup up message. |
#if !defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) && \ |
|
!defined(PEGASUS_OS_OS400) |
|
cout << PEGASUS_NAME << PEGASUS_VERSION << endl; | cout << PEGASUS_NAME << PEGASUS_VERSION << endl; |
//l10n | //l10n |
//cout << "Built " << __DATE__ << " " << __TIME__ << endl; | //cout << "Built " << __DATE__ << " " << __TIME__ << endl; |
|
|
"Listening on local connection socket."); | "Listening on local connection socket."); |
#endif | #endif |
| |
#if !defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) && !defined(PEGASUS_OS_OS400) |
#if defined(PEGASUS_DEBUG) |
if (enableHttpConnection) | if (enableHttpConnection) |
{ | { |
//l10n | //l10n |
|
|
| |
time_t last = 0; | time_t last = 0; |
| |
#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_OS_LINUX) || defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) || defined(PEGASUS_OS_AIX) || defined(PEGASUS_PLATFORM_SOLARIS_SPARC_CC) |
// | // |
// create a file to indicate that the cimserver has started and | // create a file to indicate that the cimserver has started and |
// save the process id of the cimserver process in the file | // save the process id of the cimserver process in the file |
|
|
} | } |
#endif | #endif |
| |
#if !defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU) && \ |
#if defined(PEGASUS_DEBUG) |
!defined(PEGASUS_OS_OS400) |
|
cout << "Started. " << endl; | cout << "Started. " << endl; |
#endif | #endif |
| |