summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2014-07-11 10:59:44 +0000
committerramon <ramongomez@us.es>2014-07-11 10:59:44 +0000
commit455906f232835d48d69aeec42c213cfdce5660bc (patch)
tree7a0f50d394675d1e1e99e0c74b7fb24f15e84ba9
parent1f7b2d0d657dba4230dff654e3c3c16b7eda2b00 (diff)
#646: Mejor detección de IPs en script {{{comparemac}}}.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4345 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-xserver/bin/comparemac2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/bin/comparemac b/server/bin/comparemac
index 7c3b1145..e3b2a24e 100755
--- a/server/bin/comparemac
+++ b/server/bin/comparemac
@@ -46,7 +46,7 @@ mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -s -N -e \
# Obtener datos de red.
NET=$(ip -o addr show up | awk -v ip="^$ServidorAdm/" '{if ($3=="inet" && $4 ~ ip) print $4}')
-arp-scan $NET 2>/dev/null | awk '/^[0-2]/ {gsub(/:/,"");print $1,toupper($2)}' > $TMPSCAN
+arp-scan $NET 2>/dev/null | awk '/^[0-2]*\./ {gsub(/:/,"");print $1,toupper($2)}' > $TMPSCAN
# Comparar los ficheros y mostrar las diferencias de direcciones MAC.
(while read -e IP MAC; do