Local IP [IRIX]: Added initial support

This commit is contained in:
Muhammad Herdiansyah 2017-05-08 22:12:03 +07:00
parent a3af0a3f3e
commit 05171be3a1

View file

@ -1936,7 +1936,7 @@ get_battery() {
get_local_ip() {
case "$os" in
"Linux" | "BSD" | "Solaris" | "AIX")
"Linux" | "BSD" | "Solaris" | "AIX" | "IRIX")
local_ip="$(ip route get 1 | awk -F'src' '{print $2; exit}')"
local_ip="${local_ip/uid*}"
[[ -z "$local_ip" ]] && local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')"