1
0
mirror of https://github.com/gryf/wicd.git synced 2026-02-19 08:25:47 +01:00

Changed DHCP client order to dhcpcd -> pump -> dhclient

This commit is contained in:
Adam Blackburn
2009-05-20 07:01:31 +08:00
parent f609ff99fe
commit d693839013
2 changed files with 10 additions and 6 deletions

View File

@@ -213,17 +213,17 @@ class BaseInterface(object):
"""
def get_client_name(cl):
""" Converts the integer value for a dhcp client to a string. """
if self.dhclient_cmd and cl in [misc.DHCLIENT, misc.AUTO]:
client = "dhclient"
cmd = self.dhclient_cmd
if self.dhclient_needs_verbose:
cmd += ' -v'
elif self.dhcpcd_cmd and cl in [misc.DHCPCD, misc.AUTO]:
if self.dhcpcd_cmd and cl in [misc.DHCPCD, misc.AUTO]:
client = "dhcpcd"
cmd = self.dhcpcd_cmd
elif self.pump_cmd and cl in [misc.PUMP, misc.AUTO]:
client = "pump"
cmd = self.pump_cmd
elif self.dhclient_cmd and cl in [misc.DHCLIENT, misc.AUTO]:
client = "dhclient"
cmd = self.dhclient_cmd
if self.dhclient_needs_verbose:
cmd += ' -v'
else:
client = None
cmd = ""