Changeset 1833 for zero-lliurex-dni


Ignore:
Timestamp:
Jun 6, 2016, 10:17:59 AM (3 years ago)
Author:
daduve
Message:

Adding extra files

Location:
zero-lliurex-dni/trunk/fuentes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • zero-lliurex-dni/trunk/fuentes/debian/changelog

    r507 r1833  
    1 zero-lliurex-dni (0.33) xenial; urgency=medium
    2 
    3   * First release to xenial
    4 
    5  -- Juan Ramon Pelegrina <juapesai@hotmail.com>  Tue, 09 Feb 2016 17:08:46 +0100
     1zero-lliurex-dni (0.30) xenial; urgency=high
     2
     3  *
     4
     5 -- Daniel Duran Vecino <daduve@gmail.com>  Fri, 03 Jun 2016 12:32:54 +0200
    66
    77zero-lliurex-dni (0.30) trusty; urgency=high
  • zero-lliurex-dni/trunk/fuentes/debian/control

    r507 r1833  
    88Package: zero-lliurex-dni
    99Architecture: all
    10 Depends: libnss3-tools, libccid, pcscd, libacr38u, pinentry-gtk2, pcsc-tools, libpcsclite1, libreadline6, coolkey, safesignidentityclient
     10Depends:
    1111Description: DNI-e Installer
    1212 Installer for DNI-e under GVA
  • zero-lliurex-dni/trunk/fuentes/zero-lliurex-dni.zlaunchers/zero-lliurex-accv.zmd

    r507 r1833  
    1111FF_PROFILE_PATH="" # Absolute path to user firefox profile
    1212TH_PROFILE_PATH="" # Absolute path to user firefox profile
    13 LIBRARY="/usr/lib/libaetpkss.so"
    14 OLD_LIBRARY="/usr/lib/libaetpkss.so"
     13LIBRARY="secmod.db"
     14ROUTE_LIBRARY="/var/lib/nssdb/"
     15ROUTE_MOZILLA="/usr/lib/firefox/browser/defaults/profile/"
    1516ERROR=0
    1617
    17 export TEXTDOMAIN="zero-lliurex-dni"
     18export TEXTDOMAIN="zero-lliurex-accv"
    1819
    1920# MSGS
     
    3738
    3839
    39 #instalo paquetes necesarios de los repositorios
    40 
    41 zero-installer install safesignidentityclient
    42 # Si falla la instalacion del paquete se aborat el resto y da error
    43 if [ $? != 0 ] ; then
    44         zenity --error --text="Impossible to install libpkcs11-dnie problems with repos. $MSG_FINAL_ACCV_ERROR"
    45         ERROR=1
    46         echo "$ERROR" > /tmp/zero-lliurex-accv.tmp
    47         exit 1
    48 fi
     40
     41
     42
     43
     44
    4945
    5046
     
    217213remove_accv_module_firefox(){
    218214
    219    su $USER -c "modutil -disable $FF_MODULE_NAME -force -dbdir $FF_PROFILE_PATH 2>&1"
    220    su $USER -c "modutil -delete $FF_MODULE_NAME -force -dbdir $FF_PROFILE_PATH 2>&1"
     215   #su $USER -c "modutil -disable $FF_MODULE_NAME -force -dbdir $FF_PROFILE_PATH 2>&1"
     216   #su $USER -c "modutil -delete $FF_MODULE_NAME -force -dbdir $FF_PROFILE_PATH 2>&1"
     217   cd $USER_HOME/.mozilla/firefox/
     218        if [ -f $FF_PROFILE_PATH/secmod.db ]; then
     219                su - $USER -c "rm $USER_HOME/.mozilla/firefox/$PROFPATH/secmod.db" >> debug.log
     220                echo "Deleting obsolete library in firefox home"
     221        fi
    221222}
    222223
     
    229230enable_accv_module_firefox(){
    230231
    231    su $USER -c "modutil -add $FF_MODULE_NAME -force -libfile $LIBRARY -dbdir $FF_PROFILE_PATH 2>&1"
    232    su $USER -c "modutil -enable $FF_MODULE_NAME -force -dbdir $FF_PROFILE_PATH 2>&1"
     232   #su $USER -c "modutil -add $FF_MODULE_NAME -force -libfile $LIBRARY -dbdir $FF_PROFILE_PATH 2>&1"
     233   #su $USER -c "modutil -enable $FF_MODULE_NAME -force -dbdir $FF_PROFILE_PATH 2>&1"
     234        cd $USER_HOME/.mozilla/firefox/
     235        su - $USER -c "cp $USER_HOME/secmod.db $FF_PROFILE_PATH" >> debug.log
     236        echo "Creating link to firefox home."
    233237}
    234238
     
    247251                zenity --info --text="$MSG_RUNNING_FIREFOX"
    248252                ERROR=1
    249                 echo "$ERROR" > /tmp/zero-lliurex-accv.tmp
     253                echo "$ERROR" >> /tmp/zero-lliurex-accv.tmp
    250254                exit 2
    251255        else
     
    295299
    296300make_link(){
    297 
    298         if [ ! -e $LIBRARY ]; then
    299                 if [ -e $LIBRARY.3 ]; then
    300                         ln -s $LIBRARY.3 $LIBRARY || echo " Link is not done: $LIBRARY "
     301       
     302        # Compruebo si existe la libreria que necesito.
     303        if [ ! -e $ROUTE_MOZILLA$LIBRARY ]; then
     304                echo "Library don't exists in firefox default"
     305               
     306                #No existe la libreria compruebo que el directorio donde he de crear el enlace existe, sino lo creo.
     307                if [ ! -d $ROUTE_MOZILLA ]; then
     308                        echo "Create directory for ln"
     309                        mkdir -p  $ROUTE_MOZILLA
     310                fi
     311               
     312                #Compruebo que existe la libreria de origen.
     313                if [ -e $ROUTE_LIBRARY$LIBRARY ]; then
     314                echo "Make the ln from original file to mozilla directory"
     315                        ln -s $ROUTE_LIBRARY$LIBRARY $ROUTE_MOZILLA$LIBRARY || echo " Link is not done: $ROUTE_MOZILLA$LIBRARY "
    301316       
    302317                else
    303                         echo " * Warning :  $LIBRARY.3  not found"
     318                        echo " * Warning :  $ROUTE_LIBRARY$LIBRARY      not found in your system."
     319                        echo ""
     320                        echo "Abort installation"
     321                        zenity --error --text="Impossible to create ln with $ROUTE_LIBRARY$LIBRARY because is not in your system. $MSG_FINAL_ACCV_ERROR"
     322                        exit 1
    304323                fi
    305324        fi
    306325
    307326}
     327
     328
     329#funcion de error en caso de no poder instalar un deb
     330check_install(){
     331        if [ $1 != 0 ] ; then
     332                zenity --error --text="Impossible to install $2, problems with repos. $MSG_FINAL_ACCV_ERROR"
     333                ERROR=1
     334                echo "$ERROR" >> accv_debug.log
     335                exit 1
     336        fi
     337}
     338
     339#############################################
     340##############MAIN PROGRAM####################
     341#############################################
     342
     343#####################################################
     344echo "Start smartcard installation at "`date` > accv_debug.log
     345USER_HOME=$(pwd)
     346USER=$(who | awk '{print $1;}')
     347
     348#instalo paquetes necesarios de los repositorios segun la arquitectura.
     349
     350if ( (uname -a | grep -i "x86_64" > /dev/null) ); then
     351       
     352        #echo "Es 64 bits"
     353        zero-installer install libccid
     354        check_install $? "libccid"
     355        zero-installer install pcscd
     356        check_install $? "pcscd"
     357        zero-installer install libpcsclite1
     358        check_install $? "libpcsclite1"
     359        zero-installer install libwxbase2.8-0
     360        check_install $? "libwxbase2.8-0"
     361        zero-installer install libwxgtk2.8-0
     362        check_install $? "libwxgtk2.8-0"
     363        zero-installer install safesignidentityclient
     364        check_install $? "safesignidentityclient"
     365
     366else
     367
     368        #echo "Es 32 bits"
     369        zero-installer install libccid
     370        check_install $? "libccid"
     371        zero-installer install pcscd
     372        check_install $? "pcscd"
     373        zero-installer install libpcsclite1
     374        check_install $? "libpcsclite1"
     375        zero-installer install libtiff4_3.9.6-11_i386.deb
     376        check_install $? "libtiff4_3.9.6-11_i386.deb"
     377        zero-installer install libwxbase2.8-0_2.8.12.1-12_i386.deb
     378        check_install $? "libwxbase2.8-0_2.8.12.1-12_i386.deb"
     379        zero-installer install libwxgtk2.8-0_2.8.12.1-12_i386.deb
     380        check_install $? "libwxgtk2.8-0_2.8.12.1-12_i386.deb"
     381        zero-installer install SafeSignIC3.0.112-i386-ub1204-tu-admin.deb
     382        check_install $? "SafeSignIC3.0.112-i386-ub1204-tu-admin.deb"
     383
     384
     385fi
     386
     387# Si falla la instalacion de algun paquete se habrá abortado la instalación
     388
     389#Configuració SafeSign
     390su - $USER -c "mkdir ~/.safesign" >> accv_debug.log
     391su - $USER -c "cp /usr/share/accv-files/registry ~/.safesign" >>  accv_debug.log
    308392
    309393(
     
    321405echo "# $MSG_ZENITY_ACCV_FIREFOX_2"; FF_PATH="$USER_HOME/.mozilla/firefox"
    322406do_firefox
     407exit 0
    323408echo "60"
    324409echo "# $MSG_ZENITY_ACCV_THUNDER_1";TH_MODULE_NAME="ACCV_GYD_PKCS_11"
     
    339424ERROR=$(cat /tmp/zero-lliurex-dni.tmp)
    340425
    341 if [ $ERROR != 0 ] ; then 
     426if [ '$ERROR' != '0' ] ; then 
    342427        zenity --error --text="$MSG_FINAL_ERROR" 
    343428        exit 1
Note: See TracChangeset for help on using the changeset viewer.