summaryrefslogtreecommitdiffstats
path: root/network.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2007-01-10 22:22:11 +0000
committerJeremy Katz <katzj@redhat.com>2007-01-10 22:22:11 +0000
commitaa8de545fa5aac1a9f78e4d4154cc00d16cef986 (patch)
treee6d1f13066b719f0d9cd5c1c18d5c440f1b595c9 /network.py
parent18faed4cfb428c6e3379ff1f5f983b106112b3d4 (diff)
downloadanaconda-aa8de545fa5aac1a9f78e4d4154cc00d16cef986.tar.gz
anaconda-aa8de545fa5aac1a9f78e4d4154cc00d16cef986.tar.xz
anaconda-aa8de545fa5aac1a9f78e4d4154cc00d16cef986.zip
2007-01-10 Jeremy Katz <katzj@redhat.com>
* network.py (NetworkDevice.__str__): Don't try to write out USEIPV4/USEIPV6 on a per-device basis (Network.write): Fix NETWORK_IPV6 for current code.
Diffstat (limited to 'network.py')
-rw-r--r--network.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/network.py b/network.py
index 900e209ff..b6c19d169 100644
--- a/network.py
+++ b/network.py
@@ -138,6 +138,8 @@ class NetworkDevice(SimpleConfigFile):
onBootWritten = 0
for key in keys:
+ if key in ("USEIPV4", "USEIPV6"): # XXX: these are per-device, but not written out
+ continue
if key == 'ONBOOT' and forceOffOnBoot:
s = s + key + "=" + 'no' + "\n"
# make sure we include autoneg in the ethtool line
@@ -433,7 +435,8 @@ class Network:
# make sure the directory exists
if not os.path.isdir("%s/etc/sysconfig/network-scripts" %(instPath,)):
iutil.mkdirChain("%s/etc/sysconfig/network-scripts" %(instPath,))
-
+
+ useIPV6 = False
# /etc/sysconfig/network-scripts/ifcfg-*
for dev in self.netdevices.values():
device = dev.get("device")
@@ -446,6 +449,9 @@ class Network:
f.write(str(dev))
+ if dev.get("USEIPV6"):
+ useIPV6 = True
+
# write out the hostname as DHCP_HOSTNAME if given (#81613)
if (dev.get('bootproto').lower() == 'dhcp' and self.hostname and
self.overrideDHCPhostname):
@@ -470,7 +476,7 @@ class Network:
f = open(instPath + "/etc/sysconfig/network", "w")
f.write("NETWORKING=yes\n")
- f.write("NETWORKING_IPV6=%s\n" % self.useIPv6 and "yes" or "no")
+ f.write("NETWORKING_IPV6=%s\n" % useIPV6 and "yes" or "no")
f.write("HOSTNAME=")
# use instclass hostname if set(kickstart) to override