tcf-agent: kill with USR2 in systemd stop 97/9597/2
authorMartin Kelly <mkelly@xevo.com>
Wed, 31 May 2017 11:28:00 +0000 (20:28 +0900)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 2 Jun 2017 00:57:45 +0000 (00:57 +0000)
tcf-agent ignores SIGTERM, so upstream uses USR2 instead. This issue was noticed
by Jan Kiszka and Brian Avery around the same time:

https://patchwork.openembedded.org/patch/139546/
https://patchwork.openembedded.org/patch/139560/

However, these patches fixed only the init scripts, not the systemd service
file. This patch fixes the systemd file.

Change-Id: Id59fab32ae78213efe98a646dce2eec0881720f6
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9597
Reviewed-by: José Bollo <jobol@nonadev.net>
Reviewed-by: Changhyeok Bae <changhyeok.bae@gmail.com>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>

meta-agl/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service [new file with mode: 0644]
meta-agl/recipes-devtools/tcf-agent/tcf-agent_git.bbappend [new file with mode: 0644]

diff --git a/meta-agl/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service b/meta-agl/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
new file mode 100644 (file)
index 0000000..a486ac7
--- /dev/null
@@ -0,0 +1,12 @@
+[Unit]
+Description=Target Communication Framework agent
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/tcf-agent -d -L- -l0
+KillSignal=USR2
+SuccessExitStatus=USR2
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-agl/recipes-devtools/tcf-agent/tcf-agent_git.bbappend b/meta-agl/recipes-devtools/tcf-agent/tcf-agent_git.bbappend
new file mode 100644 (file)
index 0000000..6f444b3
--- /dev/null
@@ -0,0 +1,3 @@
+# This is a backport of:
+# https://patchwork.openembedded.org/patch/140355/
+FILESEXTRAPATHS_prepend := "${THISDIR}/tcf-agent:"