mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix ubuntu reboot issue, sometimes when you install agent, the init script is not installed into /etc/rc*
This commit is contained in:
parent
d6e0d282d8
commit
c8d6d51011
@ -545,7 +545,7 @@ class cloudAgentConfig(serviceCfgBase):
|
||||
cfo.save()
|
||||
|
||||
self.syscfg.svo.stopService("cloud-agent")
|
||||
self.syscfg.svo.startService("cloud-agent")
|
||||
self.syscfg.svo.enableService("cloud-agent")
|
||||
return True
|
||||
except:
|
||||
raise
|
||||
@ -568,7 +568,7 @@ class cloudAgentConfig(serviceCfgBase):
|
||||
cfo.save()
|
||||
|
||||
self.syscfg.svo.stopService("cloud-agent")
|
||||
self.syscfg.svo.startService("cloud-agent")
|
||||
self.syscfg.svo.enableService("cloud-agent")
|
||||
return True
|
||||
except:
|
||||
raise
|
||||
@ -589,7 +589,7 @@ class cloudAgentConfig(serviceCfgBase):
|
||||
cfo.save()
|
||||
|
||||
self.syscfg.svo.stopService("cloud-agent")
|
||||
self.syscfg.svo.startService("cloud-agent")
|
||||
self.syscfg.svo.enableService("cloud-agent")
|
||||
return True
|
||||
except:
|
||||
raise
|
||||
|
||||
@ -168,8 +168,8 @@ class serviceOpsUbuntu(serviceOps):
|
||||
|
||||
def enableService(self, servicename,forcestart=False):
|
||||
bash("update-rc.d -f " + servicename + " remove")
|
||||
bash("update-rc.d -f " + servicename + " start 2 3 4 5 .")
|
||||
bash("update-rc.d -f " + servicename + " defaults")
|
||||
return self.startService(servicename,force=forcestart)
|
||||
|
||||
def isKVMEnabled(self):
|
||||
return bash("kvm-ok").isSuccess()
|
||||
return bash("kvm-ok").isSuccess()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user