diff --git a/oamapps/mcsadmin/mcsadmin.cpp b/oamapps/mcsadmin/mcsadmin.cpp index 060015053..454c7a3ea 100644 --- a/oamapps/mcsadmin/mcsadmin.cpp +++ b/oamapps/mcsadmin/mcsadmin.cpp @@ -7863,25 +7863,32 @@ int processCommand(string* arguments) { if (systemstatus.SystemOpState == oam::ACTIVE ) { - try - { - - cout << endl << " Starting Modules" << endl; - oam.startModule(devicenetworklist, ackTemp); - - //reload DBRM with new configuration, needs to be done here after startModule - cmd = installDir + "/bin/dbrmctl reload > /dev/null 2>&1"; - system(cmd.c_str()); - sleep(15); - - cout << " Successful start of Modules " << endl; - - } - catch (exception& e) - { - cout << endl << "**** startModule Failed : " << e.what() << endl; - break; - } + try + { + cout << endl << " Restarting System " << endl; + gracefulTemp = oam::FORCEFUL; + int returnStatus = oam.restartSystem(gracefulTemp, ackTemp); + switch (returnStatus) + { + case API_SUCCESS: + if ( waitForActive() ) + cout << endl << " Successful restart of System " << endl << endl; + else + cout << endl << "**** restartSystem Failed : check log files" << endl; + break; + case API_CANCELLED: + cout << endl << " Restart of System canceled" << endl << endl; + break; + default: + cout << endl << "**** restartSystem Failed : Check system logs" << endl; + break; + } + } + catch (exception& e) + { + cout << endl << "**** restartSystem Failed : " << e.what() << endl; + break; + } } else cout << endl << " System not Active, run 'startSystem' to start system if needed" << endl;