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

Revision 25874, 1.7 KB checked in by jdreed, 11 years ago (diff)
Cleanup whitespace inconsistency introduced in r25867
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
23# This tag needs to be here because we need to run _after_ c-p-d has
24# done its diversions.  "Because Upstart"
25# dh_installdeb will replace this with shell code automatically
26# generated by other debhelper scripts.
27
28#DEBHELPER#
29
30
31case "$1" in
32    configure)
33        db_get debathena-lightdm-config/force_lightdm
34        if [ "$RET" = "true" ]; then
35            db_set shared/default-x-display-manager "lightdm"
36            echo "/usr/sbin/lightdm" > /etc/X11/default-display-manager
37        fi
38       
39        # Deal with the fact that symlinks don't work in /etc/init
40        # If we managed to confuse upstart such that we don't exist,
41        # force a reload:
42        if ! status lightdm >/dev/null 2>&1; then
43            # I hope this doesn't break the world.
44            initctl reload-configuration
45        fi
46        if pgrep -u lightdm -f debathena-lightdm-greeter >/dev/null 2>&1; then
47            restart lightdm || :
48        fi
49
50    ;;
51
52    abort-upgrade|abort-remove|abort-deconfigure)
53    ;;
54
55    *)
56        echo "postinst called with unknown argument \`$1'" >&2
57        exit 1
58    ;;
59esac
60
61exit 0
Note: See TracBrowser for help on using the repository browser.