[Pkg-systemd-maintainers] systemd support in openssh-server

Uoti Urpala uoti.urpala at pp1.inet.fi
Wed Feb 12 02:09:01 GMT 2014


On Tue, 2014-02-11 at 17:33 -0800, Russ Allbery wrote:
> Colin Watson <cjwatson at debian.org> writes:
> > Aha, I see.  Just inverting the check wouldn't be the right fix, IMO,
> > but I'll retest this and sort out a proper fix.  Thanks for the
> > clarification.

Not quite right, as in it would enter the inconsistent state I mentioned
- for example if the admin for some reason ran "systemctl stop ssh" in
that state, systemd would "stop" it but not actually manage to kill the
process, and then start-stop-daemon wouldn't be called either because it
would no longer be in "active" state.

> Is it as simple as just stopping and starting sshd once the systemd unit
> file is installed and systemd has been reloaded?  Does systemd remember
> that the service was started via an init script so that it will stop via
> the init script and then start via the unit?

I don't think it has any feature to keep two sets of configuration like
that. After ssh.service has been installed and daemon-reload called,
stopping initscript-started ssh through systemd will no longer work -
it'll try to stop it with "KillMode=process", without having the correct
main PID.

Simplest fix would be to stop sshd in preinst, but then it would of
course be nice to have a way to tell dpkg to not wait arbitrarily long
after that before running postinst...






More information about the Pkg-systemd-maintainers mailing list