5 . /usr/share/debconf/confmodule
8 DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
10 # creating lightdm group if he isn't already there
11 if ! getent group lightdm >/dev/null; then
12 addgroup --system lightdm
15 # creating lightdm user if he isn't already there
16 if ! getent passwd lightdm >/dev/null; then
17 adduser --system --ingroup lightdm --home /var/lib/lightdm lightdm
18 usermod -c "Light Display Manager" lightdm
19 usermod -d "/var/lib/lightdm" lightdm
20 usermod -g "lightdm" lightdm
21 usermod -s "/bin/false" lightdm
24 if [ -d /var/lib/lightdm ]; then
25 chown -R lightdm:lightdm /var/lib/lightdm
26 chmod 0750 /var/lib/lightdm
29 # debconf is not a registry, so we only fiddle with the default file if it
31 if [ ! -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then
32 if db_get shared/default-x-display-manager; then
33 # workaround debconf passthru bug (#379198)
34 if [ -z "$RET" ]; then
37 if [ "$THIS_PACKAGE" != "$RET" ]; then
38 echo "Please be sure to run \"dpkg --configure $RET\"."
40 if db_get "$RET"/daemon_name; then
41 echo "$RET" > $DEFAULT_DISPLAY_MANAGER_FILE
46 # remove the displaced old default display manager file if it exists
47 if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE.dpkg-tmp" ]; then
48 rm "$DEFAULT_DISPLAY_MANAGER_FILE.dpkg-tmp"
51 # debconf hangs if lightdm gets started below without this
58 if [ -x /etc/init.d/lightdm ]; then
59 update-rc.d lightdm defaults $S $K >/dev/null 2>&1
62 if [ "$1" = "configure" ];
64 invoke-rc.d dbus reload || true