libnss-ldap needs systemd service file.
Colin Watson
cjwatson at ubuntu.com
Thu Oct 6 11:36:59 UTC 2016
On Wed, Oct 05, 2016 at 11:34:27PM +0200, Xen wrote:
> It appears that SystemD does not allow for services to just be started when
> a shutdown target is reached or is in the process or being reached.
And yet you then go on to describe more or less how to do exactly that
using ExecStop. (Yes, this is technically "stop" rather than "start"
and requires having a pseudo-service "started" before then, but I think
that's an uninteresting matter of semantics; init scripts that are
called on shutdown are called using the "stop" argument too.)
https://anonscm.debian.org/cgit/pkg-ssh/openssh.git/tree/debian/systemd/ssh-session-cleanup.service
is an example of a service that is started (or "stopped", whatever) on
shutdown. We don't actually use that service because it's superseded by
fixes in recent versions of libpam-systemd, but it does otherwise work.
It has RemainAfterExit=yes and Type=oneshot refinements not found in
your example.
> Alternatively the script /usr/sbin/update-rc.d would need to be fixed such
> that it supports an init file with no start levels.
>
> Strangely the postinst script executes fine:
>
> sudo update-rc.d libnss-ldap start . stop 20 0 1 6 .
> update-rc.d: warning: start and stop actions are no longer supported;
> falling back to defaults
>
> But the thing barks when you enable it and there are no start levels:
>
> update-rc.d: error: libnss-ldap Default-Start contains no runlevels,
> aborting.
https://bugs.debian.org/808887
--
Colin Watson [cjwatson at ubuntu.com]
More information about the Ubuntu-devel-discuss
mailing list