mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-18 11:34:23 +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()
|
cfo.save()
|
||||||
|
|
||||||
self.syscfg.svo.stopService("cloud-agent")
|
self.syscfg.svo.stopService("cloud-agent")
|
||||||
self.syscfg.svo.startService("cloud-agent")
|
self.syscfg.svo.enableService("cloud-agent")
|
||||||
return True
|
return True
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
@ -568,7 +568,7 @@ class cloudAgentConfig(serviceCfgBase):
|
|||||||
cfo.save()
|
cfo.save()
|
||||||
|
|
||||||
self.syscfg.svo.stopService("cloud-agent")
|
self.syscfg.svo.stopService("cloud-agent")
|
||||||
self.syscfg.svo.startService("cloud-agent")
|
self.syscfg.svo.enableService("cloud-agent")
|
||||||
return True
|
return True
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
@ -589,7 +589,7 @@ class cloudAgentConfig(serviceCfgBase):
|
|||||||
cfo.save()
|
cfo.save()
|
||||||
|
|
||||||
self.syscfg.svo.stopService("cloud-agent")
|
self.syscfg.svo.stopService("cloud-agent")
|
||||||
self.syscfg.svo.startService("cloud-agent")
|
self.syscfg.svo.enableService("cloud-agent")
|
||||||
return True
|
return True
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
|||||||
@ -168,7 +168,7 @@ class serviceOpsUbuntu(serviceOps):
|
|||||||
|
|
||||||
def enableService(self, servicename,forcestart=False):
|
def enableService(self, servicename,forcestart=False):
|
||||||
bash("update-rc.d -f " + servicename + " remove")
|
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)
|
return self.startService(servicename,force=forcestart)
|
||||||
|
|
||||||
def isKVMEnabled(self):
|
def isKVMEnabled(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user