diff options
author | ramon <ramongomez@us.es> | 2016-05-12 16:56:04 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2016-05-12 16:56:04 +0000 |
commit | db4d467957d875b6af2688e823f3099cfa134ba8 (patch) | |
tree | d9a25453f91557e0f82b4f41718d306c50723b8f /admin/Interface | |
parent | 06d9743ac04873fcc0c64b67ab8e1da18abd80f6 (diff) |
#713: Detectar nº de serie del cliente en el proceso de inicio y, si se envía al servidor, incluir el dato en la BD, si está vacío.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4927 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/Interface')
-rwxr-xr-x | admin/Interface/getConfiguration | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/admin/Interface/getConfiguration b/admin/Interface/getConfiguration index 356c99d8..c511d425 100755 --- a/admin/Interface/getConfiguration +++ b/admin/Interface/getConfiguration @@ -10,6 +10,7 @@ # No registrar los errores. export DEBUG="no" +ser=$(ogGetSerialNumber) cfg="" disks=$(ogDiskToDev | wc -w) for ((dsk=1; dsk<=$disks; dsk++)); do @@ -56,7 +57,7 @@ done # Guardar salida en fichero temporal. cfgfile=/tmp/getconfig -echo $cfg > $cfgfile +echo "${ser:+$ser;}$cfg" > $cfgfile # Crear el menú por defecto a partir del fichero generado (no dar ninguna salida). generateMenuDefault &>/dev/null @@ -64,9 +65,12 @@ generateMenuDefault &>/dev/null # Componer salida formateada. awk '{ n=split($0,sep,";"); for (i=1; i<n; i++){ - split (sep[i],dua,":"); - printf ("disk=%s\tpar=%s\tcpt=%s\tfsi=%s\tsoi=%s\ttam=%s\tuso=%s\n", - dua[1],dua[2],dua[3],dua[4],dua[5],dua[6],dua[7]); + c=split (sep[i],dua,":"); + if (i==1 && c==1) + printf ("ser=%s\n", dua[1]); + else + printf ("disk=%s\tpar=%s\tcpt=%s\tfsi=%s\tsoi=%s\ttam=%s\tuso=%s\n", + dua[1],dua[2],dua[3],dua[4],dua[5],dua[6],dua[7]); } }' $cfgfile |