mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
debugging
This commit is contained in:
parent
f197246e5b
commit
9bba645d55
11
inxi
11
inxi
|
@ -1826,10 +1826,10 @@ get_networking_local_ip_data()
|
|||
IFS=$'\n'
|
||||
A_INTERFACES_DATA=( $( ifconfig | gawk '
|
||||
BEGIN { IGNORECASE=1 }
|
||||
$1 !~ /^lo|^[ \t]/ {
|
||||
$0 !~ /^lo/ {
|
||||
# not clear on why inet is coming through, but this gets rid of it
|
||||
# as first line item.
|
||||
if ( $1 != "inet" ) {
|
||||
# if ( $1 !~ /^inet/ ) {
|
||||
interface = $1
|
||||
gsub(/,/, " ", interface)
|
||||
gsub(/^ +| +$/, "", interface)
|
||||
|
@ -1842,7 +1842,8 @@ get_networking_local_ip_data()
|
|||
ipAddresses[interface] = gensub( /addr:([0-9\.]+)/, "\\1", "g", $2 )
|
||||
}
|
||||
}
|
||||
}
|
||||
# }
|
||||
# print ":" $0 ":"
|
||||
}
|
||||
|
||||
END {
|
||||
|
@ -1854,7 +1855,10 @@ get_networking_local_ip_data()
|
|||
useInterfaceIp = ipAddresses[i]
|
||||
}
|
||||
# create array primary item for master array
|
||||
# tested needed to avoid bad data from above
|
||||
if ( useInterfaceIp != "" ) {
|
||||
print a[j] "," useInterfaceIp
|
||||
}
|
||||
j++
|
||||
}
|
||||
}') )
|
||||
|
@ -1862,6 +1866,7 @@ get_networking_local_ip_data()
|
|||
else
|
||||
A_INTERFACES_DATA=( "Interfaces requires ifconfig. App missing." )
|
||||
fi
|
||||
echo ${A_INTERFACES_DATA[@]}
|
||||
}
|
||||
|
||||
get_partition_data()
|
||||
|
|
Loading…
Reference in a new issue