On Tue, 2014-02-11 at 17:33 -0800, Russ Allbery wrote: > Colin Watson <[email protected]> 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... -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

