I'm starting dropbear ssh server in initramfs to be able to unlock a crypted partition over SSH*.
In Debian Jessie, it was all fine but in Buster, dropbear doesn't seem to stop after switch_root, which prevents OpenBSD ssh server from starting up.
apt-get purge dropbear does not help and which dropbear prints /usr/bin/dropbear and ps -ef | grep dropbear prints /sbin/dropbear; which tells that this process is the one which started at initramfs stage and it didn't stop.
As a workaround, I'm doing killall dropbear in SSH service script but it would be more appropriate to kill it right before switching the root partition.
How can I run the script at that point?