[PATCH rhel6-branch] Set installer environment hostname for sw raid LABELs (#640743)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mdadm tool will use it when creating the device.
---
 iw/network_gui.py |    2 +-
 network.py        |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/iw/network_gui.py b/iw/network_gui.py
index 4188cc5..702d227 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -95,7 +95,7 @@ class NetworkWindow(InstallWindow):
                                     custom_icon="error")
             self.hostnameError()
 
-        self.anaconda.id.network.hostname = hostname
+        self.anaconda.id.network.setHostname(hostname)
         return None
 
 def NMCEExited(pid, condition, anaconda):
diff --git a/network.py b/network.py
index f66d62f..a3a6b96 100644
--- a/network.py
+++ b/network.py
@@ -387,6 +387,9 @@ class Network:
 
     def setHostname(self, hn):
         self.hostname = hn
+        log.info("setting installation environment hostname to %s" % hn)
+        iutil.execWithRedirect("hostname", [ "-v", hn ],
+                               stdout = "/dev/tty5", stderr="/dev/tty5")
 
     def unsetDNS(self, devname):
         """Unset all DNS* ifcfg parameters."""
-- 
1.7.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux