[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#915531: lightdm: Enforce correct boot sequence with elogind (avoid greyed buttons)



Package: lightdm
Version: 1.26.0-3
Severity: normal
Tags: patch

Dear Lightdm Maintainer,
(in CC Adam Borowski)

As you may know, Elogind has been packaged for Debian: Systemd-shim is
non functional (and i believe will be removed) so elogind is the only way
left in Debian (linux) to run a functional Dispaly manager with init != systemd.
I'm attaching a patch to make sure that lightdm is started after elogind; 
in doing this i'm replacing 'hal' with 'elogind', as i think hal is gone
from all Debian architectures, please correct me if i'm wrong on this.
Also in doing this, i've noticed that in postinst script there is some 
ancient code that try to set boot order passing 'K' and 'S' to update-rc.d.
The patch fix also this.

Please note that this patch only accounts for boot sequence; fully enabling
elogind support in lightdm will need further patching but I know that 
Adam Borowski already has a patchset, so I leave that to him.   

Side note: a proper elogind support in lightdm may also account for
#770885
#804165

Thanks,
Lorenzo

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.17.3-van (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)

Versions of packages lightdm depends on:
ii  adduser                                 3.118
ii  dbus                                    1.12.10-1
ii  debconf [debconf-2.0]                   1.5.69
ii  libaudit1                               1:2.8.4-2
ii  libc6                                   2.28-1
ii  libgcrypt20                             1.8.4-4
ii  libglib2.0-0                            2.58.1-2
ii  libpam-elogind-compat [libpam-systemd]  1.2
ii  libpam0g                                1.1.8-3.8
ii  libxcb1                                 1.13.1-1
ii  libxdmcp6                               1:1.1.2-3
ii  lightdm-gtk-greeter [lightdm-greeter]   2.0.5-1
ii  lsb-base                                10.2018112800

Versions of packages lightdm recommends:
ii  xserver-xorg  1:7.7+19

Versions of packages lightdm suggests:
ii  accountsservice  0.6.45-1
ii  upower           0.99.9-2
pn  xserver-xephyr   <none>

-- Configuration Files:
/etc/init.d/lightdm changed [not included]
/etc/pam.d/lightdm-greeter changed [not included]

-- debconf information:
  lightdm/daemon_name: /usr/sbin/lightdm
* shared/default-x-display-manager: sddm
>From 6e29ea81550846d2660ac15364830267421f0818 Mon Sep 17 00:00:00 2001
From: Lorenzo Puliti <lorenzo.ru.g@gmail.com>
Date: Tue, 4 Dec 2018 01:23:16 +0100
Subject: [PATCH] Enforce right boot sequence with elogind

Replace 'hal' with 'elogind' in 'Should Start' field of the sysvinit
script, in the header section. This is to make sure that, as lightdm
is started, the 'lightdm' user gets a session opened from elogind.
Also remove 'S' and 'K' update-rc.d levels from postinst script:
setting the boot sequence that way is deprecated and no longer
effective.
---
 debian/lightdm.init     | 2 +-
 debian/lightdm.postinst | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/debian/lightdm.init b/debian/lightdm.init
index 2e81f60..0d8b795 100755
--- a/debian/lightdm.init
+++ b/debian/lightdm.init
@@ -1,7 +1,7 @@
 #! /bin/sh
 ### BEGIN INIT INFO
 # Provides:          lightdm
-# Should-Start:      console-screen kbd acpid dbus hal consolekit
+# Should-Start:      console-screen kbd acpid dbus elogind consolekit
 # Required-Start:    $local_fs $remote_fs x11-common
 # Required-Stop:     $local_fs $remote_fs
 # Default-Start:     2 3 4 5
diff --git a/debian/lightdm.postinst b/debian/lightdm.postinst
index d72cc22..44bf967 100644
--- a/debian/lightdm.postinst
+++ b/debian/lightdm.postinst
@@ -50,12 +50,9 @@ fi
 # debconf hangs if lightdm gets started below without this
 db_stop || true
 
-# update-rc.d levels
-S=30
-K=01
 
 if [ -x /etc/init.d/lightdm ]; then
-  update-rc.d lightdm defaults $S $K >/dev/null 2>&1
+  update-rc.d lightdm defaults >/dev/null 2>&1
 fi
 
 if [ "$1" = "configure" ];
-- 
2.20.0.rc2


Reply to: