summaryrefslogtreecommitdiffstats
path: root/client/engine/Net.lib
diff options
context:
space:
mode:
Diffstat (limited to 'client/engine/Net.lib')
-rwxr-xr-xclient/engine/Net.lib2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/engine/Net.lib b/client/engine/Net.lib
index f77705e8..b98fa478 100755
--- a/client/engine/Net.lib
+++ b/client/engine/Net.lib
@@ -46,7 +46,7 @@ function ogGetIpAddress ()
{
local IP
# Obtener direcciones IP. /* (comentario para Doxygen)
-IP=$(ip -o addr show | awk '$2!~/lo/ && $3~/inet$/ {sub (/\/.*/, ""); printf ("%s ", $4)}')
+IP=$(ip address show | awk '$2!~/lo/ { readline; if ($1~/inet$/) {sub (/\/.*/, ""); printf ("%s ", $2)}}')
# Mostrar sólo la primera. (comentario para Doxygen) */
echo ${IP%% *}
}