mirror of
https://github.com/gryf/wicd.git
synced 2026-01-04 21:04:15 +01:00
merged optional-dhcp-hostnames to make optional hostnames work in the daemon
This commit is contained in:
@@ -448,10 +448,16 @@ class ConnectThread(threading.Thread):
|
||||
else:
|
||||
# Run dhcp...
|
||||
self.SetStatus('running_dhcp')
|
||||
if self.network.get('usedhcphostname') == None:
|
||||
self.network['usedhcphostname'] = False
|
||||
if self.network.get('dhcphostname') == None:
|
||||
self.network['dhcphostname'] = os.uname()[1]
|
||||
print "Running DHCP with hostname",self.network["dhcphostname"]
|
||||
dhcp_status = iface.StartDHCP(self.network["dhcphostname"])
|
||||
if not self.network['usedhcphostname']:
|
||||
hname = os.uname()[1]
|
||||
else:
|
||||
hname = self.network['dhcphostname']
|
||||
print "Running DHCP with hostname",hname
|
||||
dhcp_status = iface.StartDHCP(hname)
|
||||
if dhcp_status in ['no_dhcp_offers', 'dhcp_failed']:
|
||||
if self.connect_result != "aborted":
|
||||
self.abort_connection(dhcp_status)
|
||||
|
||||
Reference in New Issue
Block a user