1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49:46 +00:00

tcf-agent: Fix daemon termination

The upstream init script uses SIGUSR2 to terminate that daemon because
SIGTERM is ignored. As the killproc function does not support specifying
a signal, switch to start-stop-daemon. Drop the retry loop because
SIGUSR2 is lethal for agent.

(From OE-Core rev: 1e6235de0a3f6302cee37332f03b1ba403c789d1)

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Jan Kiszka
2017-11-14 20:56:19 +01:00
committed by Richard Purdie
parent 3961ab82dd
commit 7e357238ef
@@ -33,16 +33,7 @@ case "$1" in
stop)
echo -n "Stopping $DAEMON_NAME: "
count=0
while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do
killproc $DAEMON_PATH >& /dev/null
sleep 1
RETVAL=$?
if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then
sleep 3
fi
count=`expr $count + 1`
done
start-stop-daemon -K -q -x $DAEMON_PATH -s USR2
rm -f /var/lock/subsys/$DAEMON_NAME
if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then
echo "FAIL"
@@ -72,4 +63,3 @@ case "$1" in
esac
exit $RETVAL