added /sbin/ip as possible binary to detect local IP address

fixes IP detection for RHEL flavors

Signed-off-by: Lukas Pirl <git@lukas-pirl.de>
This commit is contained in:
Lukas Pirl 2016-10-12 11:00:05 +02:00
parent 5a195e2339
commit 1491e9fab1

View File

@ -162,6 +162,7 @@ _win32_commands = (('route.exe', ('print',), _win32_re),)
# These work in most Unices.
_addr_re = re.compile(r'^\s*inet [a-zA-Z]*:?(?P<address>\d+\.\d+\.\d+\.\d+)[\s/].+$', flags=re.M|re.I|re.S)
_unix_commands = (('/bin/ip', ('addr',), _addr_re),
('/sbin/ip', ('addr',), _addr_re),
('/sbin/ifconfig', ('-a',), _addr_re),
('/usr/sbin/ifconfig', ('-a',), _addr_re),
('/usr/etc/ifconfig', ('-a',), _addr_re),