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
15
inxi
15
inxi
|
@ -1826,10 +1826,10 @@ get_networking_local_ip_data()
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
A_INTERFACES_DATA=( $( ifconfig | gawk '
|
A_INTERFACES_DATA=( $( ifconfig | gawk '
|
||||||
BEGIN { IGNORECASE=1 }
|
BEGIN { IGNORECASE=1 }
|
||||||
$1 !~ /^lo|^[ \t]/ {
|
$0 !~ /^lo/ {
|
||||||
# not clear on why inet is coming through, but this gets rid of it
|
# not clear on why inet is coming through, but this gets rid of it
|
||||||
# as first line item.
|
# as first line item.
|
||||||
if ( $1 != "inet" ) {
|
# if ( $1 !~ /^inet/ ) {
|
||||||
interface = $1
|
interface = $1
|
||||||
gsub(/,/, " ", interface)
|
gsub(/,/, " ", interface)
|
||||||
gsub(/^ +| +$/, "", interface)
|
gsub(/^ +| +$/, "", interface)
|
||||||
|
@ -1842,19 +1842,23 @@ get_networking_local_ip_data()
|
||||||
ipAddresses[interface] = gensub( /addr:([0-9\.]+)/, "\\1", "g", $2 )
|
ipAddresses[interface] = gensub( /addr:([0-9\.]+)/, "\\1", "g", $2 )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
# }
|
||||||
|
# print ":" $0 ":"
|
||||||
}
|
}
|
||||||
|
|
||||||
END {
|
END {
|
||||||
j=0
|
j=0
|
||||||
for (i in aInterfaces) {
|
for (i in aInterfaces) {
|
||||||
useInterfaceIp = ""
|
useInterfaceIp = ""
|
||||||
a[j]=i
|
a[j] = i
|
||||||
if (ipAddresses[i] != "") {
|
if (ipAddresses[i] != "") {
|
||||||
useInterfaceIp = ipAddresses[i]
|
useInterfaceIp = ipAddresses[i]
|
||||||
}
|
}
|
||||||
# create array primary item for master array
|
# create array primary item for master array
|
||||||
print a[j] "," useInterfaceIp
|
# tested needed to avoid bad data from above
|
||||||
|
if ( useInterfaceIp != "" ) {
|
||||||
|
print a[j] "," useInterfaceIp
|
||||||
|
}
|
||||||
j++
|
j++
|
||||||
}
|
}
|
||||||
}') )
|
}') )
|
||||||
|
@ -1862,6 +1866,7 @@ get_networking_local_ip_data()
|
||||||
else
|
else
|
||||||
A_INTERFACES_DATA=( "Interfaces requires ifconfig. App missing." )
|
A_INTERFACES_DATA=( "Interfaces requires ifconfig. App missing." )
|
||||||
fi
|
fi
|
||||||
|
echo ${A_INTERFACES_DATA[@]}
|
||||||
}
|
}
|
||||||
|
|
||||||
get_partition_data()
|
get_partition_data()
|
||||||
|
|
Loading…
Reference in a new issue