version 1.23, 2001/06/16 15:58:19
|
version 1.27, 2001/06/19 23:53:41
|
|
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM |
// Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a |
// Permission is hereby granted, free of charge, to any person obtaining a copy |
// copy of this software and associated documentation files (the "Software"), |
// of this software and associated documentation files (the "Software"), to |
// to deal in the Software without restriction, including without limitation |
// deal in the Software without restriction, including without limitation the |
// the rights to use, copy, modify, merge, publish, distribute, sublicense, |
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
// and/or sell copies of the Software, and to permit persons to whom the |
// sell copies of the Software, and to permit persons to whom the Software is |
// Software is furnished to do so, subject to the following conditions: |
// furnished to do so, subject to the following conditions: |
// |
// |
// The above copyright notice and this permission notice shall be included in |
// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN |
// all copies or substantial portions of the Software. |
// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED |
// |
// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT |
// |
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
// DEALINGS IN THE SOFTWARE. |
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
|
|
"Removes Pegasus as a Windows NT Service "}, | "Removes Pegasus as a Windows NT Service "}, |
{"debug", "false", false, Option::BOOLEAN, 0, 0, "d", | {"debug", "false", false, Option::BOOLEAN, 0, 0, "d", |
"Not Used "}, | "Not Used "}, |
{"slp", "true", false, Option::BOOLEAN, 0, 0, "slp", |
{"slp", "false", false, Option::BOOLEAN, 0, 0, "slp", |
"Register Pegasus as a Service with SLP"} | "Register Pegasus as a Service with SLP"} |
}; | }; |
const Uint32 NUM_OPTIONS = sizeof(optionsTable) / sizeof(optionsTable[0]); | const Uint32 NUM_OPTIONS = sizeof(optionsTable) / sizeof(optionsTable[0]); |
|
|
Logger::clean(logsDirectory);; | Logger::clean(logsDirectory);; |
} | } |
| |
|
// Option to Display the options table. Primarily |
|
// a diagnostic tool. |
|
if (om.valueEquals("options", "true")) |
|
om.print(); |
|
|
// Leave this in until people get familiar with the logs. | // Leave this in until people get familiar with the logs. |
cout << "Logs Directory = " << logsDirectory << endl; | cout << "Logs Directory = " << logsDirectory << endl; |
| |
|
Boolean useSLP = (om.valueEquals("slp", "true")) ? true: false; |
| |
char* address = portOption.allocateCString(); | char* address = portOption.allocateCString(); |
| |
|
|
cout <<"Started..." | cout <<"Started..." |
<< (pegasusIOTrace ? " Tracing to Display ": " ") | << (pegasusIOTrace ? " Tracing to Display ": " ") |
<< (pegasusIOLog ? " Tracing to Log ": " ") | << (pegasusIOLog ? " Tracing to Log ": " ") |
|
<< (useSLP ? " SLP reg. " : " No SLP ") |
<< endl; | << endl; |
| |
// Option to Display the options table. Primarily |
|
// a diagnostic tool. |
|
if (om.valueEquals("options", "true")) |
|
om.print(); |
|
|
|
// Put server start message to the logger | // Put server start message to the logger |
Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION, | Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION, |
"Start $0 $1 port $2 $3 ", |
"Start $0 $1 port $2 $3 $4", |
PEGASUS_NAME, | PEGASUS_NAME, |
PEGASUS_VERSION, | PEGASUS_VERSION, |
address, | address, |
(pegasusIOTrace ? " Tracing": " ")); |
(pegasusIOTrace ? " Tracing": " "), |
|
(useSLP ? " SLP on " : " SLP off ")); |
Boolean useSLP = false;; |
|
|
|
if(om.valueEquals("slp", "true")) |
|
useSLP = true; |
|
| |
// do we need to run as a daemon ? | // do we need to run as a daemon ? |
String daemonOption; | String daemonOption; |