[25500] | 1 | #!/bin/sh |
---|
| 2 | # postinst script for debathena-lightdm-config |
---|
| 3 | # |
---|
| 4 | # see: dh_installdeb(1) |
---|
| 5 | |
---|
| 6 | set -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 | |
---|
[25858] | 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 | |
---|
[25500] | 31 | case "$1" in |
---|
| 32 | configure) |
---|
[25529] | 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 |
---|
[25858] | 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 | |
---|
[25500] | 47 | ;; |
---|
| 48 | |
---|
| 49 | abort-upgrade|abort-remove|abort-deconfigure) |
---|
| 50 | ;; |
---|
| 51 | |
---|
| 52 | *) |
---|
| 53 | echo "postinst called with unknown argument \`$1'" >&2 |
---|
| 54 | exit 1 |
---|
| 55 | ;; |
---|
| 56 | esac |
---|
| 57 | |
---|
| 58 | exit 0 |
---|