git-svn-id: https://opengnsys.es/svn/trunk@762 a21b9725-9963-47de-94b9-378ad31fedc9

remotes/github/debian-pkg
jcxifre 2010-02-19 07:11:31 +00:00
parent 59d49e836e
commit 61c14c39d4
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ function ogGetMacAddress ()
{
local MAC
# Obtener direcciones Ethernet.
MAC=$(ip -o addr show | awk '$2!~/lo/ && /ether/ {printf ("%s ", toupper($11))}')
MAC=$(ip address show | awk '$2!~/lo/ {readline; if ($1~/ether/) printf ("%s ", toupper($2));}')
# Mostrar sólo la primera.
echo ${MAC%% *}
}