source: lmd-client/trunk/fuentes/debian/lmd-client.postinst @ 6150

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

fixed postinst

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