diff options
Diffstat (limited to 'client')
-rwxr-xr-x | client/engine/Inventory.lib | 3 |
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 |