summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2008-09-23 16:12:23 -1000
committerDavid Cantrell <dcantrell@redhat.com>2008-09-24 16:09:22 -1000
commite150ff01131c49c9b1876d21aaf508c0876f2722 (patch)
tree3e7ea4443a1476d7c40ac0740825cbb694191ff3
parent4d01f8375a8ce64a9363f0cf24546fe5eb9e1168 (diff)
downloadanaconda-e150ff01131c49c9b1876d21aaf508c0876f2722.tar.gz
anaconda-e150ff01131c49c9b1876d21aaf508c0876f2722.tar.xz
anaconda-e150ff01131c49c9b1876d21aaf508c0876f2722.zip
Fix problems with bringDeviceUp() calls (#463512)
Changed bringDeviceUp() in network.py to bringUp() since it really just writes out all new network configuration information and lets NetworkManager take over from there. Correct the calls to this method so we don't get tracebacks anymore.
-rw-r--r--iw/netconfig_dialog.py5
-rw-r--r--network.py6
-rw-r--r--rescue.py10
-rw-r--r--textw/netconfig_text.py7
4 files changed, 9 insertions, 19 deletions
diff --git a/iw/netconfig_dialog.py b/iw/netconfig_dialog.py
index 8e32076d0..3cacd1d18 100644
--- a/iw/netconfig_dialog.py
+++ b/iw/netconfig_dialog.py
@@ -184,11 +184,12 @@ class NetworkConfigurator:
# FIXME: need to do input validation
if self.xml.get_widget("dhcpCheckbutton").get_active():
netdev.set(('BOOTPROTO', 'dhcp'))
+ netdev.set(('ONBOOT', 'yes'))
self.window.hide()
w = gui.WaitWindow(_("Dynamic IP"),
_("Sending request for IP information "
"for %s...") %(netdev.get("device")))
- netdev.bringDeviceUp()
+ self.network.bringUp()
w.pop()
self.rc = gtk.RESPONSE_OK
else:
@@ -251,7 +252,7 @@ class NetworkConfigurator:
try:
- netdev.bringDeviceUp()
+ self.network.bringUp()
except Exception, e:
import logging
log = logging.getLogger("anaconda")
diff --git a/network.py b/network.py
index 51ca94ec1..10cb62dc2 100644
--- a/network.py
+++ b/network.py
@@ -385,10 +385,6 @@ class Network:
return None
if not hasActiveNetDev():
- for dev in self.netdevices.values():
- dev.bringDeviceUp()
-
- if not hasActiveNetDev():
log.warning("no network devices were available to look up host name")
return None
@@ -637,5 +633,5 @@ class Network:
# write out current configuration state and wait for NetworkManager
# to bring the device up
- def bringDeviceUp(self):
+ def bringUp(self):
self.write()
diff --git a/rescue.py b/rescue.py
index 4376bddab..92c89c739 100644
--- a/rescue.py
+++ b/rescue.py
@@ -143,15 +143,7 @@ def startNetworking(network, intf):
log.error("Error trying to start lo in rescue.py::startNetworking()")
# start up dhcp interfaces first
- devs = network.netdevices.keys()
- devs.sort()
- for devname in devs:
- dev = network.netdevices[devname]
- waitwin = intf.waitWindow(_("Starting Interface"),
- _("Attempting to start %s") % (dev.get('device'),))
- log.info("Attempting to start %s", dev.get('DEVICE'))
- dev.bringDeviceUp()
- waitwin.pop()
+ network.bringUp()
def runShell(screen = None, msg=""):
if screen:
diff --git a/textw/netconfig_text.py b/textw/netconfig_text.py
index 71b06c93e..43c929ddb 100644
--- a/textw/netconfig_text.py
+++ b/textw/netconfig_text.py
@@ -175,11 +175,12 @@ class NetworkConfiguratorText:
netdev = self.anaconda.id.network.available()[cur]
if self.dhcpCheckbox.selected():
- netdev.set(("bootproto", "dhcp"))
+ netdev.set(("BOOTPROTO", "dhcp"))
+ netdev.set(("ONBOOT", "yes"))
w = self.anaconda.intf.waitWindow(_("Dynamic IP"),
_("Sending request for IP information "
"for %s...") % netdev.get("device"))
- netdev.bringDeviceUp()
+ self.network.bringUp()
w.pop()
break
else:
@@ -241,7 +242,7 @@ class NetworkConfiguratorText:
continue
try:
- netdev.bringDeviceUp()
+ self.network.bringUp()
except Exception, e:
import logging
log = logging.getLogger("anaconda")