mirror of
https://github.com/clearlinux/WALinuxAgent.git
synced 2026-09-05 13:22:05 +00:00
Add register service option to setup.py install
This commit is contained in:
@@ -73,7 +73,7 @@ class RunHandler(object):
|
||||
try:
|
||||
protocol.reportStatus(vmStatus)
|
||||
except prot.ProtocolError as e:
|
||||
logger.Error("Failed to report vm status: {0}", status)
|
||||
logger.Error("Failed to report vm status: {0}", e)
|
||||
|
||||
time.sleep(25)
|
||||
|
||||
|
||||
@@ -79,3 +79,10 @@ class SUSEOSUtil(SUSE11OSUtil):
|
||||
super(SUSEOSUtil, self).__init__()
|
||||
self.dhcpClientName = 'wickedd-dhcp4'
|
||||
|
||||
def RegisterAgentService(self):
|
||||
return shellutil.Run("systemctl enable waagent", chk_err=False)
|
||||
|
||||
def UnregisterAgentService(self):
|
||||
return shellutil.Run("systemctl disable waagent", chk_err=False)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user