version 1.211, 2007/09/10 08:17:07
|
version 1.211.2.4, 2007/09/14 21:48:55
|
|
|
# endif | # endif |
#endif | #endif |
| |
#if defined(PEGASUS_OS_TYPE_UNIX) |
#if defined(PEGASUS_OS_TYPE_UNIX) || defined(PEGASUS_OS_VXWORKS) |
# include <unistd.h> | # include <unistd.h> |
# include <sys/types.h> | # include <sys/types.h> |
# include <sys/stat.h> | # include <sys/stat.h> |
|
|
char** argv, | char** argv, |
Boolean shutdownOption) | Boolean shutdownOption) |
{ | { |
|
#if defined(PEGASUS_OS_VXWORKS) |
|
|
|
// VxWorks does not use configuration files. |
|
|
|
cm->mergeCommandLine(argc, argv); |
|
|
|
#else /* PEGASUS_OS_VXWORKS */ |
|
|
if (shutdownOption) | if (shutdownOption) |
{ | { |
cm->loadConfigFiles(); | cm->loadConfigFiles(); |
|
|
| |
// Enable updates again | // Enable updates again |
cm->useConfigFiles = true; | cm->useConfigFiles = true; |
|
|
|
#endif /* PEGASUS_OS_VXWORKS */ |
} | } |
| |
/* PrintHelp - This is temporary until we expand the options manager to allow | /* PrintHelp - This is temporary until we expand the options manager to allow |
|
|
// Set Message loading to process locale | // Set Message loading to process locale |
MessageLoader::_useProcessLocale = true; | MessageLoader::_useProcessLocale = true; |
| |
|
#if defined(PEGASUS_OS_VXWORKS) |
|
// On VxWorks, run cimserver from /romfs (read-only file system). |
|
chdir("/romfs"); |
|
#endif |
|
|
#ifdef PEGASUS_OS_ZOS | #ifdef PEGASUS_OS_ZOS |
// Direct standard input to /dev/null, | // Direct standard input to /dev/null, |
close(STDIN_FILENO); | close(STDIN_FILENO); |
|
|
// Get an instance of the Config Manager. | // Get an instance of the Config Manager. |
// | // |
ConfigManager* configManager = ConfigManager::getInstance(); | ConfigManager* configManager = ConfigManager::getInstance(); |
|
|
|
#if !defined(PEGASUS_OS_VXWORKS) |
configManager->useConfigFiles = true; | configManager->useConfigFiles = true; |
|
#endif |
| |
try | try |
{ | { |
|
|
// | // |
// Check to see if we should start Pegasus as a daemon | // Check to see if we should start Pegasus as a daemon |
// | // |
|
|
daemonOption = ConfigManager::parseBooleanValue( | daemonOption = ConfigManager::parseBooleanValue( |
configManager->getCurrentValue("daemon")); | configManager->getCurrentValue("daemon")); |
| |
|
|
e.getMessage()); | e.getMessage()); |
} | } |
| |
#ifndef PEGASUS_OS_TYPE_WINDOWS |
#if !defined(PEGASUS_OS_TYPE_WINDOWS) && !defined(PEGASUS_OS_VXWORKS) |
umask(S_IRWXG|S_IRWXO); | umask(S_IRWXG|S_IRWXO); |
#endif | #endif |
| |
|
|
| |
try | try |
{ | { |
#if defined(PEGASUS_OS_TYPE_UNIX) |
#if defined(PEGASUS_OS_TYPE_UNIX) || defined(PEGASUS_OS_VXWORKS) |
// | // |
// Lock the CIMSERVER_LOCK_FILE during CIM Server start-up to prevent | // Lock the CIMSERVER_LOCK_FILE during CIM Server start-up to prevent |
// concurrent writes to this file by multiple cimserver processes | // concurrent writes to this file by multiple cimserver processes |
|
|
AutoFileLock fileLock(startupLockFileName); | AutoFileLock fileLock(startupLockFileName); |
#endif | #endif |
| |
#if defined(PEGASUS_OS_TYPE_UNIX) || defined(PEGASUS_OS_VMS) |
#if defined(PEGASUS_OS_TYPE_UNIX) || \ |
|
defined(PEGASUS_OS_VMS) || \ |
|
defined(PEGASUS_OS_VXWORKS) |
// | // |
// Check if a CIM Server is already running. If so, print an error | // Check if a CIM Server is already running. If so, print an error |
// message and notify the parent process (if there is one) to terminate | // message and notify the parent process (if there is one) to terminate |