[PATCH 1/2] Set hostname when leaving network spokes

Vratislav Podzimek vpodzime at redhat.com
Tue Sep 10 09:56:55 UTC 2013


Related: rhbz#972362

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/ui/gui/spokes/network.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 43d12e1..2e80a3c 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -1275,6 +1275,10 @@ class NetworkSpoke(FirstbootSpokeMixIn, NormalSpoke):
         log.debug("network: apply ksdata %s", self.data.network)
         self.network_control_box.kill_nmce(msg="leaving network spoke")
 
+    def execute(self):
+        # update system's hostname
+        network.set_hostname(self.data.network.hostname)
+
     @property
     def completed(self):
         # TODO: check also if source requires updates when implemented
@@ -1436,6 +1440,10 @@ class NetworkStandaloneSpoke(StandaloneSpoke):
 
         self.network_control_box.kill_nmce(msg="leaving standalone network spoke")
 
+    def execute(self):
+        # update system's hostname
+        network.set_hostname(self.data.network.hostname)
+
     @property
     def completed(self):
         return (not can_touch_runtime_system("require network connection")
-- 
1.7.11.7



More information about the anaconda-patches mailing list