source: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-config.postinst @ 25529

Revision 25529, 1.7 KB checked in by jdreed, 12 years ago (diff)
Depend on lightdm 1.0.6 or later Encourage the user to use lightdm via debconf if they're using another dm
Line 
1#!/bin/sh
2# postinst script for debathena-lightdm-config
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9#        * <postinst> `configure' <most-recently-configured-version>
10#        * <old-postinst> `abort-upgrade' <new version>
11#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12#          <new-version>
13#        * <postinst> `abort-remove'
14#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15#          <failed-install-package> <version> `removing'
16#          <conflicting-package> <version>
17# for details, see http://www.debian.org/doc/debian-policy/ or
18# the debian-policy package
19
20# Source debconf library.
21. /usr/share/debconf/confmodule
22
23GREETER="debathena-lightdm-greeter"
24SET_DEFAULTS="/usr/lib/lightdm/lightdm-set-defaults"
25
26case "$1" in
27    configure)
28        db_get debathena-lightdm-config/force_lightdm
29        if [ "$RET" = "true" ]; then
30            db_set shared/default-x-display-manager "lightdm"
31            echo "/usr/sbin/lightdm" > /etc/X11/default-display-manager
32        fi
33        # First, set it anyway with --keep-old since maybe they don't
34        # have a greeter set
35        [ -x "$SET_DEFAULTS" ] && \
36            "$SET_DEFAULTS" -k -g "$GREETER" || true
37        if ! grep -qxF "greeter-session=$GREETER" /etc/lightdm/lightdm.conf; then
38            # OK, they were using something else
39            db_get debathena-lightdm-config/force_greeter
40            if [ "$RET" = "true" ]; then
41                "$SET_DEFAULTS" -g "$GREETER" || true
42            fi
43        fi
44           
45    ;;
46
47    abort-upgrade|abort-remove|abort-deconfigure)
48    ;;
49
50    *)
51        echo "postinst called with unknown argument \`$1'" >&2
52        exit 1
53    ;;
54esac
55
56# dh_installdeb will replace this with shell code automatically
57# generated by other debhelper scripts.
58
59#DEBHELPER#
60
61exit 0
Note: See TracBrowser for help on using the repository browser.