summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-04-23 17:40:53 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-29 13:42:08 +0100
commit22f99c2aca4af26520ad75b33bb48f2a248ab7af (patch)
tree7ca11a7deffd41de60084110b18480d41dea0bdd
parent2e88b0b7f4cca7829f5ac3e9190084cc88b0a1b8 (diff)
downloadopenembedded-core-contrib-22f99c2aca4af26520ad75b33bb48f2a248ab7af.tar.gz
openembedded-core-contrib-22f99c2aca4af26520ad75b33bb48f2a248ab7af.tar.bz2
openembedded-core-contrib-22f99c2aca4af26520ad75b33bb48f2a248ab7af.zip
tcf-agent: add systemd support
Add systemd unit file tcf-agent.service. (From OE-Core rev: 1a4feebf98780f586bf2e81cf9844e6805a50799) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service10
-rw-r--r--meta/recipes-devtools/tcf-agent/tcf-agent_git.bb8
2 files changed, 17 insertions, 1 deletions
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
new file mode 100644
index 0000000000..5d7a586682
--- /dev/null
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Target Communication Framework agent
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/tcf-agent -d -L- -l0
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index 1eb0021eec..616a6a7a9a 100644
--- a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -12,6 +12,7 @@ PR = "r2"
SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git \
file://fix_ranlib.patch \
file://tcf-agent.init \
+ file://tcf-agent.service \
"
DEPENDS = "util-linux openssl"
@@ -19,7 +20,9 @@ RDEPENDS_${PN} = "bash"
S = "${WORKDIR}/git"
-inherit update-rc.d
+inherit update-rc.d systemd
+
+SYSTEMD_SERVICE_${PN} = "tcf-agent.service"
INITSCRIPT_NAME = "tcf-agent"
INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ."
@@ -44,5 +47,8 @@ do_install() {
oe_runmake install INSTALLROOT=${D}
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/tcf-agent.init ${D}${sysconfdir}/init.d/tcf-agent
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/tcf-agent.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tcf-agent.service
}