source: lmd-client/trunk/fuentes/debian/lmd-client.prerm @ 512

Last change on this file since 512 was 512, checked in by mabarracus, 5 years ago

copy trusty code

File size: 1.9 KB
Line 
1#!/bin/sh
2# prerm script for lmd-client
3#
4# see: dh_installdeb(1)
5
6set -e
7
8SYSTEM_CONFIG_SCRIPT="/etc/ltsp/update-kernels.conf"
9OUR_BINARY="/etc/ltsp/update-kernels.conf.lliurex"
10PACKAGE_NAME="lmd-client"
11# summary of how this script can be called:
12#        * <prerm> `remove'
13#        * <old-prerm> `upgrade' <new-version>
14#        * <new-prerm> `failed-upgrade' <old-version>
15#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
16#        * <deconfigured's-prerm> `deconfigure' `in-favour'
17#          <package-being-installed> <version> `removing'
18#          <conflicting-package> <version>
19# for details, see http://www.debian.org/doc/debian-policy/ or
20# the debian-policy package
21
22
23case "$1" in
24    remove|upgrade|deconfigure)
25        if [ -f "${SYSTEM_CONFIG_SCRIPT}.real" ] ; then
26
27                rm -f "${SYSTEM_CONFIG_SCRIPT}"
28                dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove "${SYSTEM_CONFIG_SCRIPT}" || true
29
30        fi
31
32        # Divert original python locales
33
34        ORIGINAL_FILE="/usr/share/ldm/rc.d/X01-localapps"
35        rm -f "$ORIGINAL_FILE"
36        dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove $ORIGINAL_FILE || true
37
38        ORIGINAL_FILE="/usr/share/ldm/rc.d/X99-zlocalapps-cleanup"
39        rm -f "$ORIGINAL_FILE"
40        dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove $ORIGINAL_FILE || true
41
42        ORIGINAL_FILE="/usr/share/ltsp/init-ltsp.d/05-getltsconffile"
43       
44        rm -f "$ORIGINAL_FILE"
45        dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove $ORIGINAL_FILE || true
46
47        ORIGINAL_FILE="/usr/share/ltsp/screen.d/ldm"
48
49        rm -f "$ORIGINAL_FILE"
50        dpkg-divert --package $PACKAGE_NAME --rename --quiet --remove $ORIGINAL_FILE || true
51
52    ;;
53
54    failed-upgrade)
55    ;;
56
57    *)
58        echo "prerm called with unknown argument \`$1'" >&2
59        exit 1
60    ;;
61esac
62
63# dh_installdeb will replace this with shell code automatically
64# generated by other debhelper scripts.
65
66#DEBHELPER#
67
68exit 0
Note: See TracBrowser for help on using the repository browser.