diff options
author | David Cantrell <dcantrell@redhat.com> | 2008-09-30 13:43:02 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2008-09-30 18:31:11 -1000 |
commit | d041811a7872a301164de49aa1336bb8dcb0539f (patch) | |
tree | 4271b25587ce2dacd67a6eb1a6d0bae5b1ec5415 /iw/netconfig_dialog.py | |
parent | a397289b40bb994b8c80bc883f38aae31b3a63f9 (diff) | |
download | anaconda-d041811a7872a301164de49aa1336bb8dcb0539f.tar.gz anaconda-d041811a7872a301164de49aa1336bb8dcb0539f.tar.xz anaconda-d041811a7872a301164de49aa1336bb8dcb0539f.zip |
Store nameserver in NetworkDevice object.
Store provided nameserver as the 'DNS1' value in the NetworkDevice
object, rather than writing out resolv.conf from the netconfig
interface code.
Diffstat (limited to 'iw/netconfig_dialog.py')
-rw-r--r-- | iw/netconfig_dialog.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/iw/netconfig_dialog.py b/iw/netconfig_dialog.py index f8c2cb0e3..c4ab0d9fb 100644 --- a/iw/netconfig_dialog.py +++ b/iw/netconfig_dialog.py @@ -250,11 +250,11 @@ class NetworkConfigurator: try: if ns: network.sanityCheckIPString(ns) + netdev.set(('DNS1', ns)) except network.IPError, msg: self._handleIPError(_("Nameserver"), msg) return False - try: self.network.bringUp() except Exception, e: @@ -264,26 +264,18 @@ class NetworkConfigurator: self._handleIPError(_("Error configuring network device:"), e) return False - self.rc = gtk.RESPONSE_OK - if ns: - f = open("/etc/resolv.conf", "w") - f.write("nameserver %s\n" %(ns,)) - f.close() - if self.rc != gtk.RESPONSE_OK: gui.MessageWindow(_("Error"), _("Error configuring network device"), type = "ok", custom_icon="error") return False - return True - + return True def main(): net = network.Network() d = NetworkConfigurator(net) ret = d.run() - if __name__ == "__main__": main() |