Julien Lavergne 4431f56ce7 debian/postinst,debian/postrm: set lubuntu as the default session and
lightdm-gtk-greeter as the default greeter if they aren't set already.
Remove them on uninstall. (thanks Didier and Lionel !)
2011-08-16 01:15:24 +02:00

31 lines
889 B
Bash

#!/bin/sh -e
set -e
# Remove alternative file if it's not a symlink, workaround for broken upgrade
# See bug #625485
if [ -f /etc/alternatives/lxdm.conf ] ; then
if [ ! -h "/etc/alternatives/lxdm.conf" ] ; then
rm -f "/etc/alternatives/lxdm.conf"
fi
fi
if [ "$1" = configure ]; then
update-alternatives --install /etc/lxdm/default.conf \
lxdm.conf /etc/xdg/lubuntu/lxdm/lxdm.conf 60
fi
if [ "$1" = configure|upgrade ]; then
if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then
/usr/lib/lightdm/lightdm-set-defaults --keep-old --session=lubuntu || true
/usr/lib/lightdm/lightdm-set-defaults --keep-old --greeter=lightdm-gtk-greeter || true
fi
fi
if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then
dpkg-maintscript-helper mv_conffile /etc/xdg/pcmanfm/lubuntu.conf /etc/xdg/pcmanfm/lubuntu/pcmanfm.conf 0.15 -- "$@"
fi
#DEBHELPER#
exit 0