summaryrefslogtreecommitdiffstats
path: root/network.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2006-09-18 22:14:33 +0000
committerDavid Cantrell <dcantrell@redhat.com>2006-09-18 22:14:33 +0000
commit92379b27d7fba57ef907669883332ee3e17207f5 (patch)
treefa27ef9c5e85c37ecb5678ba3c6f44d7020e3fca /network.py
parentfaa818d9b15057ea82d105532cef71f1a857189e (diff)
downloadanaconda-92379b27d7fba57ef907669883332ee3e17207f5.tar.gz
anaconda-92379b27d7fba57ef907669883332ee3e17207f5.tar.xz
anaconda-92379b27d7fba57ef907669883332ee3e17207f5.zip
* network.py: Added the useIPv4 and useIPv6 flags to the Network class.
These are used in the network configuration dialog boxes. Set based on existing network configuration, or initialize to true. * network.py: Read in IPV6_AUTOCONF variable from the network-script if it exists. We need this for the RFC 2462 auto configuration setting. * iw/network_gui.py: Set the IPv4 and IPv6 enable check boxes based on the useIPv4 and useIPv6 flags in the Network class. * iw/network_gui.py: Add column labels so users have an idea of what goes in the _____ / _____ entry boxes.
Diffstat (limited to 'network.py')
-rw-r--r--network.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/network.py b/network.py
index 570e4f334..7edfeca89 100644
--- a/network.py
+++ b/network.py
@@ -171,6 +171,8 @@ class Network:
self.domains = []
self.isConfigured = 0
self.hostname = "localhost.localdomain"
+ self.useIPv4 = False
+ self.useIPv6 = False
# if we specify a hostname and are using dhcp, do an override
# originally used by the gui but overloaded now
@@ -198,7 +200,7 @@ class Network:
self.firstnetdevice = info["DEVICE"]
for key in ("IPADDR", "NETMASK", "BOOTPROTO", "ONBOOT", "MTU",
"NETTYPE", "SUBCHANNELS", "PORTNAME", "CTCPROT",
- "PEERID", "ESSID", "KEY", "IPV6ADDR"):
+ "PEERID", "ESSID", "KEY", "IPV6ADDR", "IPV6_AUTOCONF"):
if info.has_key(key):
self.netdevices [info["DEVICE"]].set((key, info[key]))
if info.has_key("GATEWAY"):
@@ -207,7 +209,16 @@ class Network:
self.domains.append(info["DOMAIN"])
if info.has_key("HOSTNAME"):
self.hostname = info["HOSTNAME"]
-
+ if info.has_key("BOOTPROTO"):
+ if info["BOOTPROTO"].lower() == "dhcp":
+ self.useIPv4 = True
+ self.useIPv6 = True
+ else:
+ if info.has_key("IPADDR"):
+ self.useIPv4 = True
+ if info.has_key("IPV6ADDR"):
+ self.useIPv6 = True
+
try:
f = open("/etc/resolv.conf", "r")
except: