diff options
author | David Cantrell <dcantrell@redhat.com> | 2008-09-24 16:06:27 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2008-09-24 16:09:22 -1000 |
commit | 3d0bd8bb289340f9b78c6fec28c39788d439af70 (patch) | |
tree | 277b3ec4d8fd0ce95b1e7e2a00b63ed86d421914 /network.py | |
parent | 2021524989bc7105208fbfe10234f8f87d47fafb (diff) | |
download | anaconda-3d0bd8bb289340f9b78c6fec28c39788d439af70.tar.gz anaconda-3d0bd8bb289340f9b78c6fec28c39788d439af70.tar.xz anaconda-3d0bd8bb289340f9b78c6fec28c39788d439af70.zip |
Bring back isys.resetResolv() and fix NetworkManager polling in network.py.
Bring back the isys.resetResolv() function to kick glibc and make it
reinitialize itself from /etc/resolv.conf again. We need to do this
to account for NetworkManager writing out a new resolv.conf.
In network.bringUp(), init i to 0 so we actually loop and poll
NetworkManager's state.
Diffstat (limited to 'network.py')
-rw-r--r-- | network.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/network.py b/network.py index e495b7aa8..1a36ffd09 100644 --- a/network.py +++ b/network.py @@ -631,16 +631,18 @@ class Network: nm = bus.get_object(isys.NM_SERVICE, isys.NM_MANAGER_PATH) props = dbus.Interface(nm, isys.DBUS_PROPS_IFACE) - i = 45 + i = 0 while i < 45: state = props.Get(isys.NM_SERVICE, "State") if int(state) == isys.NM_STATE_CONNECTED: + isys.resetResolv() return True i += 1 time.sleep(1) state = props.Get(isys.NM_SERVICE, "State") if int(state) == isys.NM_STATE_CONNECTED: + isys.resetResolv() return True return False |