changed ifconfig to ip a for wider compatibility
This commit is contained in:
parent
e11c3ed0fc
commit
660b5649a1
1 changed files with 3 additions and 3 deletions
|
|
@ -277,7 +277,7 @@ declare -a macs=()
|
|||
declare -a ifups=()
|
||||
for device in $(ls /sys/class/net/ | grep -v "$filtered_adapters") ; do
|
||||
adapters+=($device)
|
||||
_ip=$(ip -f inet -o addr show $device | cut -d\ -f 7 | cut -d/ -f 1 | head -n 1)
|
||||
_ip=$(ip -o -f inet addr show $device | awk '{print $4}' | cut -d/ -f 1 | head -n 1)
|
||||
if valid-ip $_ip ; then
|
||||
ips+=("$_ip")
|
||||
ifups+=("up")
|
||||
|
|
|
|||
Loading…
Reference in a new issue