diff --git a/fuelmenu/modules/dnsandhostname.py b/fuelmenu/modules/dnsandhostname.py index 34a0898..7e8cd87 100644 --- a/fuelmenu/modules/dnsandhostname.py +++ b/fuelmenu/modules/dnsandhostname.py @@ -13,6 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. +from ctypes import cdll from fuelmenu.common import dialog from fuelmenu.common.modulehelper import ModuleHelper from fuelmenu.common import network @@ -28,6 +29,7 @@ import socket import urwid import urwid.raw_display import urwid.web_display +res_init = cdll.LoadLibrary('libc.so.6').__res_init log = logging.getLogger('fuelmenu.mirrors') blank = urwid.Divider() @@ -274,6 +276,9 @@ is accessible"} # use the corresponding template instead of duplicating it here. make_resolv_conf('/etc/resolv.conf') + # Reread resolv.conf + res_init() + return True def cancel(self, button):