summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rwxr-xr-xclient/engine/Inventory.lib3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/engine/Inventory.lib b/client/engine/Inventory.lib
index f3a779d7..92b46ef4 100755
--- a/client/engine/Inventory.lib
+++ b/client/engine/Inventory.lib
@@ -109,7 +109,8 @@ fi
# Obtener nÂș de serie (ignorar los no especificados).
SERIALNO=$(dmidecode -s system-serial-number | egrep -vi "(^[ 0]+$|not specified|to be filled|invalid entry|default string)")
-# Truncar cadena si >25 caracteres.
+# Quitar espacios y truncar cadena si >25 caracteres.
+SERIALNO="${SERIALNO// /}"
[ ${#SERIALNO} -gt 25 ] && SERIALNO="${SERIALNO:0:22}..."
[ -n "$SERIALNO" ] && echo "$SERIALNO"
return 0