Local IP: Added support for AIX

This commit is contained in:
Muhammad Herdiansyah 2017-01-04 10:53:43 +07:00
parent 60ab558dec
commit d896c29942
1 changed files with 2 additions and 2 deletions

View File

@ -1778,9 +1778,9 @@ get_battery() {
get_local_ip() {
case "$os" in
"Linux" | "BSD" | "Solaris")
"Linux" | "BSD" | "Solaris" | "AIX")
local_ip="$(ip route get 1 | awk '{print $NF;exit}')"
[[ -z "$local_ip" ]] && local_ip="$(ifconfig | awk '/broadcast/ {print $2}')"
[[ -z "$local_ip" ]] && local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')"
;;
"MINIX")