mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #2451 from twinshadow/patch-2
Update salt/modules/network.py: get all interfaces for the `ip` command
This commit is contained in:
commit
87cefbbb99
@ -233,8 +233,9 @@ def interfaces():
|
||||
'''
|
||||
ifaces = dict()
|
||||
if __salt__['cmd.has_exec']('ip'):
|
||||
cmd = __salt__['cmd.run']('ip addr show')
|
||||
ifaces = _interfaces_ip(cmd)
|
||||
cmd1 = __salt__['cmd.run']('ip link show')
|
||||
cmd2 = __salt__['cmd.run']('ip addr show')
|
||||
ifaces = _interfaces_ip(cmd1 + cmd2)
|
||||
elif __salt__['cmd.has_exec']('ifconfig'):
|
||||
cmd = __salt__['cmd.run']('ifconfig -a')
|
||||
ifaces = _interfaces_ifconfig(cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user