[PATCH rhel6-branch] Fix write-out of network --hostname option in generated ks (#643008).

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

 



Update of already commited patch for the bug
(commit 1c0fc1e094dd3d258c0fcb98df6b90551c66b8f8).
It concerns cases of devices not configured in UI or ks, therefore
not having any BOOTPROTO setting, for which we don't want to write
--hostname setting.
---
 network.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/network.py b/network.py
index 8774b14..48c1e79 100644
--- a/network.py
+++ b/network.py
@@ -550,7 +550,7 @@ class Network:
 
             # hostname
             if (self.overrideDHCPhostname or
-                dev.get('BOOTPROTO').lower() != "dhcp"):
+                (dev.get('BOOTPROTO') and dev.get('BOOTPROTO').lower() != "dhcp")):
                 if (self.hostname and
                     self.hostname != "localhost.localdomain"):
                     line += " --hostname %s" % self.hostname
-- 
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