git-svn-id: https://opengnsys.es/svn/trunk@762 a21b9725-9963-47de-94b9-378ad31fedc9
parent
59d49e836e
commit
61c14c39d4
|
@ -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%% *}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue