(file) Return to cimserver.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Server

Diff for /pegasus/src/Server/cimserver.cpp between version 1.81 and 1.82

version 1.81, 2002/10/30 20:33:00 version 1.82, 2003/01/25 14:41:32
Line 214 
Line 214 
 #if defined(PEGASUS_OS_TYPE_WINDOWS) #if defined(PEGASUS_OS_TYPE_WINDOWS)
     usage.append ("    -install    - installs pegasus as a Windows NT Service\n");     usage.append ("    -install    - installs pegasus as a Windows NT Service\n");
     usage.append ("    -remove     - removes pegasus as a Windows NT Service\n");     usage.append ("    -remove     - removes pegasus as a Windows NT Service\n");
       usage.append ("    -start    - starts pegasus as a Windows NT Service\n");
       usage.append ("    -stop     - stops pegasus as a Windows NT Service\n");
 #endif #endif
     usage.append ("  configProperty=value\n");     usage.append ("  configProperty=value\n");
     usage.append ("                - sets CIM Server configuration property\n");     usage.append ("                - sets CIM Server configuration property\n");
Line 384 
Line 386 
     pegasusHome = OS400_DEFAULT_PEGASUS_HOME;     pegasusHome = OS400_DEFAULT_PEGASUS_HOME;
 #endif #endif
  
   #ifndef PEGASUS_OS_TYPE_WINDOWS
     //     //
     // Get environment variables:     // Get environment variables:
     //     //
Line 395 
Line 398 
     }     }
  
     FileSystem::translateSlashes(pegasusHome);     FileSystem::translateSlashes(pegasusHome);
   #else
  
     // windows only
     setHome(pegasusHome);
   #endif
     // on Windows NT if there are no command-line options, run as a service     // on Windows NT if there are no command-line options, run as a service
  
     if (argc == 1 )     if (argc == 1 )
Line 470 
Line 477 
                 //                 //
                 // Check to see if user asked for shutdown (-s option):                 // Check to see if user asked for shutdown (-s option):
                 //                 //
                 else if (*option == OPTION_SHUTDOWN)                  else if (*option == OPTION_SHUTDOWN &&
                           (strlen(option) == 1))
                 {                 {
                     //                     //
                     // check to see if user is root                     // check to see if user is root
Line 537 
Line 545 
         //         //
         // Check to see if we should (can) install as a NT service         // Check to see if we should (can) install as a NT service
         //         //
   
         if (String::equal(configManager->getCurrentValue("install"), "true"))         if (String::equal(configManager->getCurrentValue("install"), "true"))
         {         {
             if( 0 != cimserver_install_nt_service( pegasusHome ))              if(cimserver_install_nt_service())
             {             {
                 cout << "\nPegasus installed as NT Service";                 cout << "\nPegasus installed as NT Service";
                 exit(0);                 exit(0);
             }             }
               else
               {
                   exit(0);
               }
         }         }
  
         //         //
Line 553 
Line 564 
  
         if (String::equal(configManager->getCurrentValue("remove"), "true"))         if (String::equal(configManager->getCurrentValue("remove"), "true"))
         {         {
             if( 0 != cimserver_remove_nt_service() )              if(cimserver_remove_nt_service())
             {             {
                 cout << "\nPegasus removed as NT Service";                 cout << "\nPegasus removed as NT Service";
                 exit(0);                 exit(0);
             }             }
               else
               {
                   exit(0);
               }
   
           }
   
           //
           // Check to see if we should (can) start as a NT service
           //
           if (String::equal(configManager->getCurrentValue("start"), "true"))
           {
               if(cimserver_start_nt_service())
               {
                   cout << "\nPegasus started as NT Service";
                   exit(0);
               }
               else
               {
                   exit(0);
               }
           }
   
           //
           // Check to see if we should (can) stop as a NT service
           //
           if (String::equal(configManager->getCurrentValue("stop"), "true"))
           {
               if(cimserver_stop_nt_service())
               {
                   cout << "\nPegasus stopped as NT Service";
                   exit(0);
               }
               else
               {
                   exit(0);
               }
         }         }
  
         //         //


Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2