summaryrefslogtreecommitdiff
path: root/azurelinuxagent/distro/suse/osutil.py
diff options
context:
space:
mode:
authorBen Howard <ben.howard@ubuntu.com>2015-12-07 16:48:51 -0700
committerusd-importer <ubuntu-server@lists.ubuntu.com>2015-12-08 16:10:11 +0000
commit83432149e212155469b1e9f06eb0095121377356 (patch)
tree9029a2e7836dce3025d5c5a6527d74bbf8d799e5 /azurelinuxagent/distro/suse/osutil.py
parent04946cba49f19c0b6b876bccdbb36d47334af002 (diff)
downloadvyos-walinuxagent-83432149e212155469b1e9f06eb0095121377356.tar.gz
vyos-walinuxagent-83432149e212155469b1e9f06eb0095121377356.zip
Import patches-unapplied version 2.1.2-0ubuntu1 to ubuntu/xenial-proposed
Imported using git-ubuntu import. Changelog parent: 04946cba49f19c0b6b876bccdbb36d47334af002 New changelog entries: * New upstream release (LP: #1523715): - Bug fixes for Ubuntu 15.10 on Azure - Enablement for Azure Stack - Dropped patch for systemd job as upstream now includes it.
Diffstat (limited to 'azurelinuxagent/distro/suse/osutil.py')
-rw-r--r--azurelinuxagent/distro/suse/osutil.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/azurelinuxagent/distro/suse/osutil.py b/azurelinuxagent/distro/suse/osutil.py
index 870e0b7..8d6f5bf 100644
--- a/azurelinuxagent/distro/suse/osutil.py
+++ b/azurelinuxagent/distro/suse/osutil.py
@@ -79,6 +79,26 @@ class SUSEOSUtil(SUSE11OSUtil):
super(SUSEOSUtil, self).__init__()
self.dhclient_name = 'wickedd-dhcp4'
+ def stop_dhcp_service(self):
+ cmd = "systemctl stop {0}".format(self.dhclient_name)
+ return shellutil.run(cmd, chk_err=False)
+
+ def start_dhcp_service(self):
+ cmd = "systemctl start {0}".format(self.dhclient_name)
+ return shellutil.run(cmd, chk_err=False)
+
+ def start_network(self) :
+ return shellutil.run("systemctl start network", chk_err=False)
+
+ def restart_ssh_service(self):
+ return shellutil.run("systemctl restart sshd", chk_err=False)
+
+ def stop_agent_service(self):
+ return shellutil.run("systemctl stop waagent", chk_err=False)
+
+ def start_agent_service(self):
+ return shellutil.run("systemctl start waagent", chk_err=False)
+
def register_agent_service(self):
return shellutil.run("systemctl enable waagent", chk_err=False)