Force fuelmenu to re-read resolv.conf on change
Fuelmenu updates resolv.conf but uses old nameservers till restart. It makes NTP and repository accessibility checks to fail. Change-Id: Ifc6f1d51f655b7329af6942bb060beebeeae5fef Closes-Bug: 1603445
This commit is contained in:
parent
0ed9e206ed
commit
c4ff3eebde
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue