I just noticed this patch from Lorenzo overlaps with my recently-merged
fix.

On Tue, Dec 04, 2018 at 03:02:26PM +0100, Lorenzo Puliti wrote:
[...] 
> 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
[...]

Looks like we could get 3 bugs closed in one go!

[...]
> 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

Presumably removing this is still a relevant tidy-up.

> +# Should-Start:      console-screen kbd acpid dbus elogind consolekit

This part of Lorenzo's patch is obsoleted by:

https://salsa.debian.org/xfce-extras-team/lightdm/-/commit/acc57681ca4ae740310820e32c31ea67caf99f75

which solves the problem in the same way as all the other display
managers.

> 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

But this is still a relevant tidy-up. (The removed code is harmless
though.)

Reply via email to