FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS Development

 
 
LinkBack Thread Tools
 
Old 01-21-2009, 02:58 PM
Jesse Keating
 
Default Reset resolver before looking up IP address.

---
network.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/network.py b/network.py
index 0d0e2b0..9661fda 100644
--- a/network.py
+++ b/network.py
@@ -1,7 +1,7 @@
#
# network.py - network configuration install data
#
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -440,6 +440,9 @@ class Network:
log.warning("no network devices were available to look up host name")
return None

+ # reset the resolver in case things have changed.
+ isys.resetResolv()
+
try:
(family, socktype, proto, canonname, sockaddr) =
socket.getaddrinfo(self.hostname, None, socket.AF_INET)[0]
--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-21-2009, 03:07 PM
Chris Lumens
 
Default Reset resolver before looking up IP address.

> diff --git a/network.py b/network.py
> index 0d0e2b0..9661fda 100644
> --- a/network.py
> +++ b/network.py
> @@ -1,7 +1,7 @@
> #
> # network.py - network configuration install data
> #
> -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
> +# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
> #
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -440,6 +440,9 @@ class Network:
> log.warning("no network devices were available to look up host name")
> return None
>
> + # reset the resolver in case things have changed.
> + isys.resetResolv()
> +
> try:
> (family, socktype, proto, canonname, sockaddr) =
> socket.getaddrinfo(self.hostname, None, socket.AF_INET)[0]

As far as hacks go, this looks fine to me. Oh if only we didn't have to
do this everywhere.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 06:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org