mirror of
https://github.com/gryf/wicd.git
synced 2025-12-19 20:38:00 +01:00
Added DNS fix to wired class
This commit is contained in:
@@ -380,7 +380,7 @@ class Wireless:
|
|||||||
return misc.RunRegex(ip_pattern,output)
|
return misc.RunRegex(ip_pattern,output)
|
||||||
#end function GetIP
|
#end function GetIP
|
||||||
|
|
||||||
def CreateAdHocNetwork(self,essid,channel,ip,enctype,key,encused):
|
def CreateAdHocNetwork(self,essid,channel,ip,enctype,key,encused,ics):
|
||||||
misc.Run("killall dhclient dhclient3 wpa_supplicant") #remove wpa_supplicant, as it can cause the connection to revert to
|
misc.Run("killall dhclient dhclient3 wpa_supplicant") #remove wpa_supplicant, as it can cause the connection to revert to
|
||||||
#previous networks...
|
#previous networks...
|
||||||
misc.Run('ifconfig ' + self.wireless_interface + ' down')
|
misc.Run('ifconfig ' + self.wireless_interface + ' down')
|
||||||
@@ -541,13 +541,15 @@ class Wired:
|
|||||||
self.lock.acquire()
|
self.lock.acquire()
|
||||||
self.ConnectingMessage = 'setting_static_dns'
|
self.ConnectingMessage = 'setting_static_dns'
|
||||||
self.lock.release()
|
self.lock.release()
|
||||||
print "setting the first and second dns servers...", network["dns2"], network["dns2"]
|
print "setting the first dns server...", network["dns1"]
|
||||||
resolv = open("/etc/resolv.conf","w")
|
resolv = open("/etc/resolv.conf","w")
|
||||||
misc.WriteLine(resolv,"nameserver " + network["dns1"])
|
misc.WriteLine(resolv,"nameserver " + network["dns1"])
|
||||||
misc.WriteLine(resolv,"nameserver " + network["dns2"])
|
if not network.get("dns2") == None:
|
||||||
|
print "setting the second dns server...", network["dns2"]
|
||||||
|
misc.WriteLine(resolv,"nameserver " + network["dns2"])
|
||||||
if not network.get("dns3") == None:
|
if not network.get("dns3") == None:
|
||||||
print "setting the third dns server..."
|
print "setting the third dns server..."
|
||||||
misc.WriteLine(resolv,"nameserver " + network["dns3"])
|
misc.WriteLine(resolv,"nameserver " + network["dns3"]))
|
||||||
|
|
||||||
if not network.get("ip") == None:
|
if not network.get("ip") == None:
|
||||||
self.lock.acquire()
|
self.lock.acquire()
|
||||||
|
|||||||
Reference in New Issue
Block a user