diff --git a/calculate/lib/utils/ip.py b/calculate/lib/utils/ip.py index aeb8de9..cfc0c2d 100644 --- a/calculate/lib/utils/ip.py +++ b/calculate/lib/utils/ip.py @@ -153,8 +153,9 @@ def isIpInNet(checkip,*ipnets): def isDhcpIp(interface="eth0"): """Get ip by dhcp or static""" - # dhclient - if filter(lambda x:interface in x and ("dhcpcd" in x or "dhclient" in x), + # dhclients (dhcpcd, dhclient (dhcp), udhcpc (busybox) + dhcpProgs = ("dhcpcd","dhclient","udhcpc") + if filter(lambda x:interface in x and any(prog in x for prog in dhcpProgs), getRunCommands()): return True else: