summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-12-21 12:38:45 +0000
committerramon <ramongomez@us.es>2017-12-21 12:38:45 +0000
commit42d268a42aadfe828e0795962a8b26958b042bef (patch)
tree679e6bd9d58fa0338d326106044e571bec6f9e65 /client
parent7d54b0b61d2521732968622981c7cb05efb7a64f (diff)
#730: Corregir errata al obtener bancos de memoria en inventario de hardware; crear fichero de comandos Windows si no existe al aƱadir el primero de ellos y subir el timeout de conexiones REST a 500 ms.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5542 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rwxr-xr-xclient/engine/Inventory.lib21
-rwxr-xr-xclient/engine/PostConf.lib3
2 files changed, 14 insertions, 10 deletions
diff --git a/client/engine/Inventory.lib b/client/engine/Inventory.lib
index 6a9e9d72..ce8cba68 100755
--- a/client/engine/Inventory.lib
+++ b/client/engine/Inventory.lib
@@ -291,15 +291,18 @@ lshw | awk 'BEGIN {type="mod";}
/clock:/ {clock=$2;}
/slot:/ {sub(/ *slot: */,""); slot=$0;}
/\*-/ {if (type=="mem"){
- if (size!="")
- print type"="vend,prod,size,clock" ("slot")";
+ if (size!=""){
+ numbank++;
+ print type"="vend,prod,size,clock" ("slot")";}
}else{
- if (type!="" && prod!=""){
- if (prod=="v."vers)
- vers="";
- print type"="vend,prod,size,vers;} }
- if (type=="totalmem") {
- totalmemory="mem="size;
+ if (type=="totalmem"){
+ if (size!=""){
+ totalmemory="mem="size;}
+ }else{
+ if (type!="" && prod!=""){
+ if (prod=="v."vers)
+ vers="";
+ print type"="vend,prod,size,vers;} }
}
type=prod=vend=vers=size=clock=slot="";}
$1~/-core/ {type="boa";}
@@ -319,7 +322,7 @@ lshw | awk 'BEGIN {type="mod";}
$1~/-serial/ {type="bus";}
END {if (type!="" && prod!="")
print type"="vend,prod,size,vers;
- if ( length(numbank) == 0 && length(totalmemory) >=4 )
+ if (length(numbank)==0 && length(totalmemory)>=4)
print totalmemory; }
'
# */ (comentario para Doxygen)
diff --git a/client/engine/PostConf.lib b/client/engine/PostConf.lib
index 22722889..3483c870 100755
--- a/client/engine/PostConf.lib
+++ b/client/engine/PostConf.lib
@@ -220,8 +220,9 @@ fi
[ $# == 4 ] || return $(ogRaiseError $OG_ERR_FORMAT; echo $?)
# Punto de montaje
MOUNTPOINT="$(ogMount "$1" "$2")" || return $?
-# Comprobar que existe el fichero de comandos.
+# Crear fichero de comandos, si no existe.
CMDFILE="$(ogGetPath "$MOUNTPOINT/windows/system32")/$3"
+[ -n "$CMDFILE" ] || ogInstallMiniSetup "$1" "$2" "$3"
[ -n "$CMDFILE" ] || ogRaiseError $OG_ERR_NOTFOUND "$MOUNTPOINT/windows/system32/$3" || return $?
# Concatenamos el comando en el fichero de comandos