alfred: Fix procd process handling for disable state
authorSven Eckelmann <sven@narfation.org>
Mon, 15 Feb 2021 20:03:57 +0000 (21:03 +0100)
committerSven Eckelmann <sven@narfation.org>
Mon, 15 Feb 2021 20:03:57 +0000 (21:03 +0100)
commit993f03cecb2db3e845bfa6ba4326bc352f853e3c
tree5972f18da7e4570fa9b0b389a9a777b54271eb01
parent58e0a4d5c312feee9a6ca17bdf97a81400245fe4
alfred: Fix procd process handling for disable state

Alfred can be stopped during a (re)start or reload when:

* disabled = 1
* batman-adv interface is missing
* MAC based EUI64 IPv6 link-local address not set

It is assumed that procd detects that the procd instance definition
disappeared and the currently running instance must be stopped. But all
these checks were triggering an "exit" which then stopped the alfred init
script and the wrapper from /lib/functions/procd.sh. And thus procd was
never informed about the instances which should be changed.

The correct handling is to return the result of the function instead of
directly killing the init scripts.

Fixes: 45db0e60d2ff ("alfred: use procd")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
alfred/Makefile
alfred/files/alfred.init