dropbear: close all active clients on shutdown
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>
Thu, 12 Jul 2018 02:36:03 +0000 (22:36 -0400)
committerJohn Crispin <john@phrozen.org>
Wed, 8 Aug 2018 13:36:46 +0000 (15:36 +0200)
commit8139438fc036fc0f5e2070373cc8caa9091f38bc
treeeeaf8132528db6fb193ccac2149a7a4e191457d7
parentc3df07ab3b2b5c0c8b989e9d1d14c3e75ed0c237
dropbear: close all active clients on shutdown

Override the default shutdown action (stop) and close all processes
of dropbear

Since commit 498fe85, the stop action only closes the process
that's listening for new connections, maintaining the ones with
existing clients.
This poses a problem when restarting or shutting-down a device,
because the connections with existing SSH clients, like OpenSSH,
are not properly closed, causing them to hang.

This situation can be avoided by closing all dropbear processes when
shutting-down the system, which closes properly the connections with
current clients.

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
[Luis: Rework commit message]
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
(cherry picked from commit 1e177844bc814d3846312c91cd0f7a54df4f32b9)
package/network/services/dropbear/files/dropbear.init