From 4da15999131161e3ea4a1fe0be86bb88bd2adfae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C3=ADas=20Sklar?= Date: Wed, 23 Jul 2003 18:00:43 +0000 Subject: [PATCH 1/1] Se arregla la carga de datos del codep. --- novedades/cargas/1.localhost/carga | 26 +++++++++++++++++++ .../scripts/10-borrar-codep | 2 +- .../40-codep => 1.localhost/scripts/20-codep} | 7 ++--- .../bal747f.mecon.ar/scripts/10-borrar-codep | 9 ------- .../bal747f.mecon.ar/scripts/20-copiar-datos | 4 +-- .../cargas/bal747f.mecon.ar/scripts/40-codep | 21 --------------- .../bal747f.mecon.ar/scripts/60-copiar-codep | 9 ------- .../scripts/10-borrar-codep | 9 ------- .../scripts/20-copiar-datos | 4 +-- .../scripts/60-copiar-codep | 9 ------- .../scripts/20-copiar-datos | 4 +-- .../intranet2.mecon.ar/scripts/40-codep | 21 --------------- .../scripts/60-copiar-codep | 9 ------- 13 files changed, 37 insertions(+), 97 deletions(-) create mode 100755 novedades/cargas/1.localhost/carga rename novedades/cargas/{intranet2.mecon.ar => 1.localhost}/scripts/10-borrar-codep (61%) rename novedades/cargas/{intranet-db.mecon.ar/scripts/40-codep => 1.localhost/scripts/20-codep} (79%) delete mode 100755 novedades/cargas/bal747f.mecon.ar/scripts/10-borrar-codep delete mode 100755 novedades/cargas/bal747f.mecon.ar/scripts/40-codep delete mode 100755 novedades/cargas/bal747f.mecon.ar/scripts/60-copiar-codep delete mode 100755 novedades/cargas/intranet-db.mecon.ar/scripts/10-borrar-codep delete mode 100755 novedades/cargas/intranet-db.mecon.ar/scripts/60-copiar-codep delete mode 100755 novedades/cargas/intranet2.mecon.ar/scripts/40-codep delete mode 100755 novedades/cargas/intranet2.mecon.ar/scripts/60-copiar-codep diff --git a/novedades/cargas/1.localhost/carga b/novedades/cargas/1.localhost/carga new file mode 100755 index 0000000..938b226 --- /dev/null +++ b/novedades/cargas/1.localhost/carga @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Script para cargar bases de datos. +# +# Creado por Leandro Lucarella (llucar) el miĆ© ene 22 17:57:00 ART 2003 +# + +# ConfiguraciĆ³n. +home="$1" +datos="$2" +host="intranet-db.mecon.ar" +user="intranet" +pass="intranet" +db="CODEP" + +# Script. +/bin/run-parts \ + --lsbsysinit \ + --verbose \ + --arg="$host" \ + --arg="$user" \ + --arg="$pass" \ + --arg="$db" \ + --arg="$home" \ + --arg="$datos" \ + "$home/scripts" diff --git a/novedades/cargas/intranet2.mecon.ar/scripts/10-borrar-codep b/novedades/cargas/1.localhost/scripts/10-borrar-codep similarity index 61% rename from novedades/cargas/intranet2.mecon.ar/scripts/10-borrar-codep rename to novedades/cargas/1.localhost/scripts/10-borrar-codep index 027807b..affbf99 100755 --- a/novedades/cargas/intranet2.mecon.ar/scripts/10-borrar-codep +++ b/novedades/cargas/1.localhost/scripts/10-borrar-codep @@ -6,4 +6,4 @@ db="$4" home="$5" datos="$6" -ssh novedades@"$host" rm -vf "$datos"/codep +rm -vf "$datos"/codep diff --git a/novedades/cargas/intranet-db.mecon.ar/scripts/40-codep b/novedades/cargas/1.localhost/scripts/20-codep similarity index 79% rename from novedades/cargas/intranet-db.mecon.ar/scripts/40-codep rename to novedades/cargas/1.localhost/scripts/20-codep index d7be87a..eb44976 100755 --- a/novedades/cargas/intranet-db.mecon.ar/scripts/40-codep +++ b/novedades/cargas/1.localhost/scripts/20-codep @@ -2,8 +2,7 @@ host="$1" user="$2" pass="$3" -#db="$4" -db="CODEP" +db="$4" home="$5" datos="$6" @@ -17,5 +16,7 @@ FIELDS TERMINATED BY LINES TERMINATED BY '\n' FROM - Dependencias; + Dependencias +WHERE + dependencia_esta_activa = 1; EOT diff --git a/novedades/cargas/bal747f.mecon.ar/scripts/10-borrar-codep b/novedades/cargas/bal747f.mecon.ar/scripts/10-borrar-codep deleted file mode 100755 index 772b034..0000000 --- a/novedades/cargas/bal747f.mecon.ar/scripts/10-borrar-codep +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -host="$1" -user="$2" -pass="$3" -db="$4" -home="$5" -datos="$6" - -ssh -1 novedades@"$host" rm -vf "$datos"/codep diff --git a/novedades/cargas/bal747f.mecon.ar/scripts/20-copiar-datos b/novedades/cargas/bal747f.mecon.ar/scripts/20-copiar-datos index 64d86e0..3255b35 100755 --- a/novedades/cargas/bal747f.mecon.ar/scripts/20-copiar-datos +++ b/novedades/cargas/bal747f.mecon.ar/scripts/20-copiar-datos @@ -7,5 +7,5 @@ home="$5" datos="$6" scp -1 -vr "$datos"/* novedades@"$host":"$datos" -ssh -1 novedades@"$host" chmod -v 775 "$datos" -ssh -1 novedades@"$host" chmod -vR 664 "$datos"/* +ssh -1 -n novedades@"$host" chmod -v 775 "$datos" +ssh -1 -n novedades@"$host" chmod -vR 664 "$datos"/* diff --git a/novedades/cargas/bal747f.mecon.ar/scripts/40-codep b/novedades/cargas/bal747f.mecon.ar/scripts/40-codep deleted file mode 100755 index d7be87a..0000000 --- a/novedades/cargas/bal747f.mecon.ar/scripts/40-codep +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -host="$1" -user="$2" -pass="$3" -#db="$4" -db="CODEP" -home="$5" -datos="$6" - -cat <