source: lliurex-smart/trunk/fuentes/debian/lliurex-smart.postinst @ 3184

Last change on this file since 3184 was 3184, checked in by hectorgh, 2 years ago

fixing profile

File size: 1.3 KB
Line 
1#!/bin/sh
2
3
4SMART_NOTEBOOK="/opt/SMART Technologies/Notebook Software/bin/Notebook/notebook"
5LLIUREX_SMART="/usr/bin/lliurex-notebook"
6
7BASH_MOD1="/opt/SMART Technologies/.store/smart-notebook/install/bash-path"
8BASH_MOD1_DIVERTED="$BASH_MOD1.diverted"
9BASH_MOD2="/opt/SMART Technologies/.store/smart-product-drivers/install/bash-path"
10BASH_MOD2_DIVERTED="$BASH_MOD2.diverted"
11
12
13case "$1" in
14
15        configure)
16               
17                # Sanity checks, testing previous installations
18
19                if [ ! -L "${SMART_NOTEBOOK}" ]; then
20
21                        mv "${SMART_NOTEBOOK}" "${SMART_NOTEBOOK}".bkp
22                        ln -s "${LLIUREX_SMART}" "${SMART_NOTEBOOK}"
23
24                else
25
26                        echo "[ LliureX Smart ] : Link is done, nothing to do"
27                        if [ -L "${SMART_NOTEBOOK}.bkp" ]; then
28                                echo "[ LliureX Smart ] , your origins are dark ... smart-notebook reinstall is needed"
29                                echo "[ LliureX Smart ] , for if the flies ...remove the loop of the dead"
30                                echo "[ Loop of the Dead detected... removing it ]"
31                                rm -f "${SMART_NOTEBOOK}.bkp" || true
32                        fi
33
34                fi
35
36        dpkg-divert --add --package lliurex-smart --rename --divert "$BASH_MOD1_DIVERTED" "$BASH_MOD1"
37        dpkg-divert --add --package lliurex-smart --rename --divert "$BASH_MOD2_DIVERTED" "$BASH_MOD22
38
39                ;;
40
41        abort-upgrade|abort-remove|abort-deconfigure)
42       
43                exit 0
44                ;;
45
46        *)
47               
48                echo "postinst called with unknown argument \`$1'" >&2
49                exit 0
50        ;;
51
52esac
53
54
55#DEBHELPER#
56
57exit 0
Note: See TracBrowser for help on using the repository browser.