#730 #738: Si se reinicia el servicio ogAdmServer, se reutiliza el pureto en Linux 3.9+; se actualiza la configuración del cliente tras el comando Restaurar Imagen (falta aplicar cambios en imagen básica).
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5398 a21b9725-9963-47de-94b9-378ad31fedc9remotes/github/debian-pkg
parent
cad73bac21
commit
82e5b6cb68
|
@ -1453,7 +1453,7 @@ BOOLEAN CrearSoftIncremental(TRAMA* ptrTrama)
|
|||
BOOLEAN RestaurarImagen(TRAMA* ptrTrama)
|
||||
{
|
||||
int lon;
|
||||
char *nfn,*dsk,*par,*idi,*ipr,*ifs,*nci,*ids,*ptc,msglog[LONSTD];
|
||||
char *nfn,*dsk,*par,*idi,*ipr,*ifs,*cfg,*nci,*ids,*ptc,msglog[LONSTD];
|
||||
char modulo[] = "RestaurarImagen()";
|
||||
|
||||
if (ndebug>=DEBUG_MAXIMO) {
|
||||
|
@ -1483,6 +1483,11 @@ BOOLEAN RestaurarImagen(TRAMA* ptrTrama)
|
|||
else
|
||||
muestraMensaje(11,NULL);
|
||||
|
||||
/* Obtener nueva configuración */
|
||||
cfg=LeeConfiguracion();
|
||||
if(!cfg){ // No se puede recuperar la configuración del cliente
|
||||
errorLog(modulo,36,FALSE);
|
||||
}
|
||||
|
||||
/* Envia respuesta de ejecución de la función de interface */
|
||||
initParametros(ptrTrama,0);
|
||||
|
@ -1491,6 +1496,7 @@ BOOLEAN RestaurarImagen(TRAMA* ptrTrama)
|
|||
lon+=sprintf(ptrTrama->parametros+lon,"dsk=%s\r",dsk); // Número de disco
|
||||
lon+=sprintf(ptrTrama->parametros+lon,"par=%s\r",par); // Número de partición
|
||||
lon+=sprintf(ptrTrama->parametros+lon,"ifs=%s\r",ifs); // Identificador del perfil software
|
||||
lon+=sprintf(ptrTrama->parametros+lon,"cfg=%s\r",cfg); // Configuración de discos
|
||||
respuestaEjecucionComando(ptrTrama,herror,ids);
|
||||
|
||||
liberaMemoria(nfn);
|
||||
|
@ -1500,6 +1506,7 @@ BOOLEAN RestaurarImagen(TRAMA* ptrTrama)
|
|||
liberaMemoria(nci);
|
||||
liberaMemoria(ipr);
|
||||
liberaMemoria(ifs);
|
||||
liberaMemoria(cfg);
|
||||
liberaMemoria(ptc);
|
||||
liberaMemoria(ids);
|
||||
|
||||
|
|
|
@ -2387,7 +2387,7 @@ BOOLEAN RESPUESTA_RestaurarImagen(SOCKET *socket_c, TRAMA* ptrTrama)
|
|||
Database db;
|
||||
Table tbl;
|
||||
BOOLEAN res;
|
||||
char *iph, *ido, *idi, *dsk, *par, *ifs;
|
||||
char *iph, *ido, *idi, *dsk, *par, *ifs, *cfg;
|
||||
char modulo[] = "RESPUESTA_RestaurarImagen()";
|
||||
|
||||
if (!db.Open(usuario, pasguor, datasource, catalog)) { // Error de conexion
|
||||
|
@ -2412,11 +2412,15 @@ BOOLEAN RESPUESTA_RestaurarImagen(SOCKET *socket_c, TRAMA* ptrTrama)
|
|||
dsk = copiaParametro("dsk",ptrTrama); // Número de disco
|
||||
par = copiaParametro("par",ptrTrama); // Número de partición
|
||||
ifs = copiaParametro("ifs",ptrTrama); // Identificador del perfil software contenido
|
||||
|
||||
cfg = copiaParametro("cfg",ptrTrama); // Configuración de discos
|
||||
if(cfg){
|
||||
actualizaConfiguracion(db, tbl, cfg, atoi(ido)); // Actualiza la configuración del ordenador
|
||||
liberaMemoria(cfg);
|
||||
}
|
||||
res=actualizaRestauracionImagen(db, tbl, idi, dsk, par, ido, ifs);
|
||||
|
||||
liberaMemoria(iph);
|
||||
liberaMemoria(ido);
|
||||
liberaMemoria(ido);
|
||||
liberaMemoria(idi);
|
||||
liberaMemoria(par);
|
||||
liberaMemoria(ifs);
|
||||
|
@ -2643,7 +2647,6 @@ BOOLEAN RESPUESTA_EjecutarScript(SOCKET *socket_c, TRAMA* ptrTrama)
|
|||
}
|
||||
|
||||
cfg = copiaParametro("cfg",ptrTrama); // Toma configuración de particiones
|
||||
|
||||
if(cfg){
|
||||
actualizaConfiguracion(db, tbl, cfg, atoi(ido)); // Actualiza la configuración del ordenador
|
||||
liberaMemoria(cfg);
|
||||
|
@ -3578,6 +3581,7 @@ int main(int argc, char *argv[]) {
|
|||
socklen_t iAddrSize;
|
||||
struct sockaddr_in local, cliente;
|
||||
char modulo[] = "main()";
|
||||
int activo=1;
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------
|
||||
Validación de parámetros de ejecución y lectura del fichero de configuración del servicio
|
||||
|
@ -3715,6 +3719,7 @@ int main(int argc, char *argv[]) {
|
|||
Creación y configuración del socket del servicio
|
||||
---------------------------------------------------------------------------------------------------------*/
|
||||
socket_s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); // Crea socket del servicio
|
||||
setsockopt(socket_s, SOL_SOCKET, SO_REUSEPORT, &activo, sizeof(int));
|
||||
if (socket_s == SOCKET_ERROR) { // Error al crear el socket del servicio
|
||||
errorLog(modulo, 13, TRUE);
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
Loading…
Reference in New Issue