X-Git-Url: https://git.llucax.com/z.facultad/75.08/llamadas.git/blobdiff_plain/5584a7d80d372660daf0a1a8d4f8ab97a1204289..2c52d0edf3050721c5678cce6daeb1fbc46f22b3:/BUGAFINSTAL?ds=sidebyside diff --git a/BUGAFINSTAL b/BUGAFINSTAL index bb4da4a..9c56556 100755 --- a/BUGAFINSTAL +++ b/BUGAFINSTAL @@ -131,7 +131,7 @@ clear SISOPTP=$(uname) CURRDIR=`echo ${0%/*} | sed s%'\.'%$PWD%` -# [STEP1] Verifico el OS vs SCRIP y la presencia de PERL +# [STEP1] Verifico el OS vs SCRIPT y la presencia de PERL echo ">> Verificando version del software contra el OS.." checkOS if [ "$?" -ne 0 ]; then exit 1 @@ -169,113 +169,10 @@ fi done # [STEP3] Chequeamos si hay componentes ya instalados -if [ "2" = "3" ]; then - #busco paquetes instalados. Leo afinstal.conf para ver que hay - #como el archivo existe, tiene que tener alguna info almacenada.. - instdir=`cat $afinstal | grep -n INSTDIR | grep 1 | sed s/\.\*\=\ //` - confdir=`cat $afinstal | grep -n CONFDIR | grep 2 | sed s/\.\*\=\ //` - #Busco los binarios - comp=0 - anti=0 - afic=0 - afim=0 - bindir=`cat $afinstal | grep -n BINDIR | grep 11 | sed s/\.\*\=\ //` - logdir=`cat $afinstal | grep -n LOGDIR | grep 12 | sed s/\.\*\=\ //` - logname=`cat $afinstal | grep -n LOGNAME | grep 13 | sed s/\.\*\=\ //` - logsize=`cat $afinstal | grep -n BINDIR | grep 14 | sed s/\.\*\=\ //` - - # Si habia algo instalado, la informacion del los directorios quedo - # almacenada, pues es igual para todos los scripts. Excepto el directorio de - # datos para antifraude. - if [ ! -f "$bindir""antifraude.pl" ]; then - #instalo antifraude porque no existe - echo "Instalando Antifraude..." - anti=1 - cp "$instdir/antifraude.pl" "$bindir/antifraude.pl" - fi - if [ ! -f "$bindir""aficonf" ]; then - #instalo aficonf porque no existe - echo "Instalando Aficonf..." - afic=1 - cp "$instdir/aficonf" "$bindir/aficonf" - fi - if [ ! -f "$bindir""afimonio" ]; then - #instalo afimonio porque no existe - echo "Instalando Afimonio..." - afim=1 - cp "$instdir/afimonio" "$bindir/afimonio" - fi - - #hay que loguear lo que se instalo - comp=$(($anti + $afic + $afim)) - if [ $anti != 0 ]; then - echo "Ingrese la ruta completa para el directorio de datos" - read datadir - while [ ! -d "$datadir" ]; do - echo "La ruta especificada no existe, ingrese un directorio existente" - read datadir - done - echo "Ingrese tamaño máximo de datos" - read datasize - fecha=$(date) - cat "$confdir/afinstal.conf" | sed "10s/.*/Comando antifraude.pl/" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "11s(.*(BINDIR = $bindir(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "12s(.*(LOGDIR = $logdir(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "13s(.*(LOGNAME = $logname(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "14s(.*(LOGSIZE = $logsize(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "15s(.*(DATADIR = $datadir(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "16s(.*(DATASIZE = $datasize(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "17s(.*(USERID = $USER(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "18s(.*(FECINS = $fecha(" > "$confdir/afinstal.conf" - fi - if [ $afic != 0 ]; then - fecha=$(date) - cat "$confdir/afinstal.conf" | sed "20s/.*/Comando aficonf/" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "21s(.*(BINDIR = $bindir(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "22s(.*(LOGDIR = $logdir(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "23s(.*(LOGNAME = $logname(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "24s(.*(LOGSIZE = $logsize(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "25s(.*(USERID = $USER(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "26s(.*(FECINS = $fecha(" > "$confdir/afinstal.conf" - fi - if [ $afim != 0 ]; then - fecha=$(date) - cat "$confdir/afinstal.conf" | sed "30s/.*/Comando afimonio/" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "31s(.*(BINDIR = $bindir(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "32s(.*(LOGDIR = $logdir(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "33s(.*(LOGNAME = $logname(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "34s(.*(LOGSIZE = $logsize(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "35s(.*(USERID = $USER(" > "$confdir/afinstal.conf" - cat "$confdir/afinstal.conf" | sed "36s(.*(FECINS = $fecha(" > "$confdir/afinstal.conf" - fi - if [ $comp == 0 ]; then - #busco los datos - fecha1=`cat $afinstal | grep -n FECINS | grep 18 | sed s/\.\*\=\ //` - fecha2=`cat $afinstal | grep -n FECINS | grep 26 | sed s/\.\*\=\ //` - fecha3=`cat $afinstal | grep -n FECINS | grep 36 | sed s/\.\*\=\ //` - usu1=`cat $afinstal | grep -n USERID | grep 17 | sed s/\.\*\=\ //` - usu2=`cat $afinstal | grep -n USERID | grep 25 | sed s/\.\*\=\ //` - usu3=`cat $afinstal | grep -n USERID | grep 35 | sed s/\.\*\=\ //` - -cat<> $CONFFILE echo "CONFDIR = $CONFDIR" >> $CONFFILE @@ -434,3 +330,65 @@ done # [STEP6] Ofrecer arrancar el Afimonio si estan los tres paquetes instalados # [STEP7] Mostrar en un recuadro que se encuentra instalado en el sistema + + +################## NO DAR BOLA A TODO LO QUE SIGUE ######################## +exit 0 +if [ "2" = "3" ]; then + #busco paquetes instalados. Leo afinstal.conf para ver que hay + #como el archivo existe, tiene que tener alguna info almacenada.. + instdir=`cat $afinstal | grep -n INSTDIR | grep 1 | sed s/\.\*\=\ //` + confdir=`cat $afinstal | grep -n CONFDIR | grep 2 | sed s/\.\*\=\ //` + #Busco los binarios + comp=0 + anti=0 + afic=0 + afim=0 + bindir=`cat $afinstal | grep -n BINDIR | grep 11 | sed s/\.\*\=\ //` + logdir=`cat $afinstal | grep -n LOGDIR | grep 12 | sed s/\.\*\=\ //` + logname=`cat $afinstal | grep -n LOGNAME | grep 13 | sed s/\.\*\=\ //` + logsize=`cat $afinstal | grep -n BINDIR | grep 14 | sed s/\.\*\=\ //` + + # Si habia algo instalado, la informacion del los directorios quedo + # almacenada, pues es igual para todos los scripts. Excepto el directorio de + # datos para antifraude. + if [ ! -f "$bindir""antifraude.pl" ]; then + #instalo antifraude porque no existe + echo "Instalando Antifraude..." + anti=1 + cp "$instdir/antifraude.pl" "$bindir/antifraude.pl" + fi + if [ ! -f "$bindir""aficonf" ]; then + #instalo aficonf porque no existe + echo "Instalando Aficonf..." + afic=1 + cp "$instdir/aficonf" "$bindir/aficonf" + fi + if [ ! -f "$bindir""afimonio" ]; then + #instalo afimonio porque no existe + echo "Instalando Afimonio..." + afim=1 + cp "$instdir/afimonio" "$bindir/afimonio" + fi + + #busco los datos + fecha1=`cat $afinstal | grep -n FECINS | grep 18 | sed s/\.\*\=\ //` + fecha2=`cat $afinstal | grep -n FECINS | grep 26 | sed s/\.\*\=\ //` + fecha3=`cat $afinstal | grep -n FECINS | grep 36 | sed s/\.\*\=\ //` + usu1=`cat $afinstal | grep -n USERID | grep 17 | sed s/\.\*\=\ //` + usu2=`cat $afinstal | grep -n USERID | grep 25 | sed s/\.\*\=\ //` + usu3=`cat $afinstal | grep -n USERID | grep 35 | sed s/\.\*\=\ //` + +cat<