source: lightdm-running/trunk/fuentes/debian/lightdm-classroom.postinst @ 325

Last change on this file since 325 was 325, checked in by hectorgh, 5 years ago

adding project files

File size: 1.4 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="lightdm-classroom"
20case "$1" in
21    configure)
22
23                ORIGINAL_FILE="/etc/pam.d/lightdm"
24                LLIUREX_FILE="/etc/pam.d/lightdm.lliurex"
25                NEW_FILE="/etc/pam.d/lightdm.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 ${ORIGINAL_FILE}.lliurex $ORIGINAL_FILE
34                        fi
35
36                fi
37
38    ;;
39
40
41
42    abort-upgrade|abort-remove|abort-deconfigure)
43    ;;
44
45    *)
46        echo "postinst called with unknown argument \`$1'" >&2
47        exit 1
48    ;;
49esac
50
51# dh_installdeb will replace this with shell code automatically
52# generated by other debhelper scripts.
53
54#DEBHELPER#
55
56exit 0
Note: See TracBrowser for help on using the repository browser.