Blob Blame History Raw
From f51337e5b8746ccb4402129c9bd3d86c578e49f0 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Wed, 11 Jan 2017 16:41:00 +0100
Subject: [PATCH 2/2] fix for hostnamectl (#534)

RH-Author: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-id: <20170111164100.436-3-vkuznets@redhat.com>
Patchwork-id: 73241
O-Subject: [RHEL-7.4/7.3.z WALinuxAgent PATCH 2/2] fix for hostnamectl (#534)
Bugzilla: 1413674
RH-Acked-by: Cathy Avery <cavery@redhat.com>

From: Hans Krijger <hglkrijger@users.noreply.github.com>

(cherry picked from commit 5949843494a0c00d852f01e35a87d34674960f2b)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 azurelinuxagent/common/osutil/redhat.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/azurelinuxagent/common/osutil/redhat.py b/azurelinuxagent/common/osutil/redhat.py
index f8372f0..8e86f6e 100644
--- a/azurelinuxagent/common/osutil/redhat.py
+++ b/azurelinuxagent/common/osutil/redhat.py
@@ -98,7 +98,7 @@ class RedhatOSUtil(Redhat6xOSUtil):
         """
         Unlike redhat 6.x, redhat 7.x will set hostname via hostnamectl
         """
-        shellutil.run("hostnamectl {0}".format(hostname))
+        shellutil.run("hostnamectl set-hostname {0}".format(hostname))
 
     def publish_hostname(self, hostname):
         """
-- 
1.8.3.1