source: lliurex-custom-xrdp/trunk/fuentes/debian/postinst @ 4731

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

leaving english keymap for now

File size: 1.8 KB
Line 
1#!/bin/sh
2#
3# see: dh_installdeb(1)
4
5set -e
6
7# summary of how this script can be called:
8#        * <postinst> `configure' <most-recently-configured-version>
9#        * <old-postinst> `abort-upgrade' <new version>
10#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
11#          <new-version>
12#        * <postinst> `abort-remove'
13#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
14#          <failed-install-package> <version> `removing'
15#          <conflicting-package> <version>
16# for details, see http://www.debian.org/doc/debian-policy/ or
17# the debian-policy package
18
19PACKAGE_NAME="lliurex-custom-xrdp"
20case "$1" in
21    configure)
22
23                ORIGINAL_FILE="/etc/xrdp/startwm.sh"
24                LLIUREX_FILE="/etc/xrdp/startwm.lliurex"
25                NEW_FILE="/etc/xrdp/startwm.diverted"
26                if [ ! -r "$NEW_FILE" ] ; then
27                        dpkg-divert --package $PACKAGE_NAME --rename  --add --divert  $NEW_FILE  $ORIGINAL_FILE
28                fi
29
30                if [ ! -L $ORIGINAL_FILE ] ; then
31                        if [ "$(readlink -f $ORIGINAL_FILE)" != "${LLIUREX_FILE}"  ] ; then
32                                rm -rf $ORIGINAL_FILE || true
33                                ln -fs $LLIUREX_FILE $ORIGINAL_FILE
34                        fi
35                fi
36
37                ORIGINAL_FILE="/etc/xrdp/km-0409.ini"
38                NEW_FILE="/etc/xrdp/km-0409.ini.diverted"
39                LLIUREX_FILE="/etc/xrdp/km-0409.lliurex"
40
41                # LEAVING ENGLISH KEYMAP FOR NOW
42
43                # if [ ! -L "$KM_FILE" ] ; then
44                #
45                #        dpkg-divert --package $PACKAGE_NAME --rename  --add --divert  $NEW_FILE  $ORIGINAL_FILE
46                #       ln -s $LLIUREX_FILE $ORIGINAL_FILE
47                # fi
48
49                # ###
50
51                systemctl restart xrdp || true
52
53
54    ;;
55
56
57
58    abort-upgrade|abort-remove|abort-deconfigure)
59    ;;
60
61    *)
62        echo "postinst called with unknown argument \`$1'" >&2
63        exit 1
64    ;;
65esac
66
67# dh_installdeb will replace this with shell code automatically
68# generated by other debhelper scripts.
69
70#DEBHELPER#
71
72exit 0
Note: See TracBrowser for help on using the repository browser.