Ignore:
Timestamp:
Jul 6, 2016, 9:09:19 AM (5 years ago)
Author:
Juanma
Message:

WIP on notifications and installation results

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zero-center/trunk/fuentes/install-files/usr/bin/zero-reinstall

    r1294 r2108  
    6868                echo "Zero-installer install the package $PACKAGE_NAME"
    6969                zero-installer install "$PACKAGE_NAME"
     70                #Get zero-installer exit status
     71                ERROR=$?
    7072                #Me guardo el fichero de los logs por si algo fallase o para revisarlo
    7173                cat $ZERO_LOG >> $INSTALL_LOG
     
    7375#Testeamos si el paquete se ha instalado bien
    7476                TEST=$( dpkg-query -s $PACKAGE_NAME 2> /dev/null| grep Status | cut -d " " -f 4 )
    75                 if [ "$TEST" = 'installed' ]; then
     77                if [ "$TEST" = 'installed' -a "$ERROR" -eq 0 ]; then
    7678                        echo " ------------------- " >> $INSTALL_LOG
    7779                        echo "Package $PACKAGE_NAME has been installed, Congratulations"
    7880                        zenity --info --title="Zero-installer" --text="$PACKAGE_NAME $MSG_FINISH_INSTALLED $INSTALL_LOG" > /dev/null 2>&1 &
    79                         su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$PACKAGE_NAME $MSG_FINISH_INSTALLED $INSTALL_LOG'" $USER
     81                        su -c "notify-send -t 5000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$PACKAGE_NAME $MSG_FINISH_INSTALLED $INSTALL_LOG'" $USER
    8082                        exit 0
    8183                else
     
    8385                        echo "$MSG_FINISH_ERROR"
    8486                        zenity --info --title="Zero-installer" --text="$PACKAGE_NAME $MSG_FINISH_ERROR $INSTALL_LOG" > /dev/null 2>&1 &
    85                         su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$PACKAGE_NAME $MSG_FINISH_ERROR $INSTALL_LOG'" $USER
     87                        su -c "notify-send -t 5000 -u critical -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' '$PACKAGE_NAME $MSG_FINISH_ERROR $INSTALL_LOG'" $USER
    8688                        exit 1
    8789                fi
Note: See TracChangeset for help on using the changeset viewer.