[PATCH 10/15] remove Network(): writeKS
Radek Vykydal
rvykydal at redhat.com
Thu Jul 19 10:02:43 UTC 2012
This seems not to be used anymore as this happens in newui apply.
---
pyanaconda/network.py | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index cf16292..9e8a28a 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -468,19 +468,6 @@ class Network:
return dev.get('IPV6_DEFAULTGW')
return ""
- def writeKS(self, f):
- devNames = self.netdevices.keys()
- devNames.sort()
-
- if len(devNames) == 0:
- return
-
- hostname = getHostname()
- for devName in devNames:
- dev = self.netdevices[devName]
- line = "%s" % kickstartNetworkData(dev, hostname)
- f.write(line)
-
def disableNMForStorageDevices(self, anaconda):
for devName, device in self.netdevices.items():
if (device.usedByFCoE(anaconda) or
@@ -713,6 +700,19 @@ def dracutBootArguments(ifcfg, storage_ipaddr, hostname=None):
return netargs
+def writeKS(f):
+ devNames = getDevices()
+
+ if len(devNames) == 0:
+ return
+
+ hostname = getHostname()
+ for devName in devNames.sort():
+ ifcfg = NetworkDevice(netscriptsDir, devName)
+ ifcfg.loadIfcfgFile()
+ line = "%s" % kickstartNetworkData(ifcfg, hostname)
+ f.write(line)
+
def kickstartNetworkData(ifcfg, hostname=None):
from pyanaconda.kickstart import NetworkData
--
1.7.4
More information about the anaconda-patches
mailing list