source: lliurex-smart/trunk/fuentes/debian/lliurex-smart.prerm @ 3253

Last change on this file since 3253 was 3253, checked in by hectorgh, 3 years ago

deleting links when removing

File size: 1.2 KB
Line 
1#!/bin/bash
2
3set -e
4
5
6case "$1" in
7    remove)
8        PKG="lliurex-smart"
9        BASH_MOD1="/opt/SMART Technologies/.store/smart-notebook/install/bash-path"
10        BASH_MOD1_DIVERTED="$BASH_MOD1.diverted"
11        BASH_MOD1_LLIUREX="/opt/lliurex-smart/notebook-bash-path"
12        BASH_MOD2="/opt/SMART Technologies/.store/smart-product-drivers/install/bash-path"
13        BASH_MOD2_DIVERTED="$BASH_MOD2.diverted"
14        BASH_MOD2_LLIUREX="/opt/lliurex-smart/product-drivers-bash-path"
15
16       
17        if [ -f "$BASH_MOD1_DIVERTED" ]; then
18                rm -rf "$BASH_MOD1"
19                dpkg-divert --remove --package ${PKG} --rename --divert "$BASH_MOD1_DIVERTED" "$BASH_MOD1"
20
21        fi
22
23        if [ -f "$BASH_MOD2_DIVERTED" ]; then
24                rm -rf "$BASH_MOD2"
25                dpkg-divert --remove --package ${PKG} --rename --divert "$BASH_MOD2_DIVERTED" "$BASH_MOD2"
26        fi
27       
28       
29        if [ -e "/opt/lliurex-smart/notebook-software" ];then
30                rm -rf "/opt/lliurex-smart/notebook-software"
31        fi
32
33        if [ -e "/opt/lliurex-smart/smart-product-drivers" ];then
34               rm -rf  "/opt/lliurex-smart/smart-product-drivers"
35        fi
36       
37    ;;
38
39    failed-upgrade)
40        ;;
41        upgrade|deconfigure)
42    ;;
43
44    *)
45        echo "prerm called with unknown argument \`$1'" >&2
46        exit 1
47    ;;
48esac
49
50
51
52#DEBHELPER#
53
54exit 0
Note: See TracBrowser for help on using the repository browser.