summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--admin/WebConsole/includes/restfunctions.php2
-rwxr-xr-xclient/engine/Inventory.lib21
-rwxr-xr-xclient/engine/PostConf.lib3
3 files changed, 15 insertions, 11 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index 99bc2f89..3f91f7f5 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -7,7 +7,7 @@
* @warning Default options: does not verifying certificate, connection timeout 200 ms.
* @Date 2015-10-14
*/
-function multiRequest($data, $options=array(CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_TIMEOUT_MS => 200)) {
+function multiRequest($data, $options=array(CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_TIMEOUT_MS => 500)) {
// array of curl handles
$curly = array();
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