summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMuhammad Shakeel <muhammad_shakeel@mentor.com>2013-09-04 11:05:01 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-10 23:15:15 +0100
commit06ecd689aeff3879df31b0ae73aab732292d1b08 (patch)
tree4ef530db360839d5a0413dfecd8807371d95b1b9 /meta
parent1661f5c90afd6a7aeecc6ad450a7104fe2dd5f00 (diff)
downloadpoky-06ecd689aeff3879df31b0ae73aab732292d1b08.tar.gz
rpcbind: Add systemd support
- Remove dependency on meta-systemd (From OE-Core rev: 3ecb5e21b3b4f05f2d527264c3574fdc37984a77) Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf3
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.service14
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb16
3 files changed, 32 insertions, 1 deletions
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
new file mode 100644
index 0000000000..2a4dfbcfbc
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
@@ -0,0 +1,3 @@
1# Optional arguments passed to rpcbind.
2#
3RPCBIND_OPTS=""
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
new file mode 100644
index 0000000000..4de28d4ae1
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -0,0 +1,14 @@
1[Unit]
2Description=RPC Bind
3After=network.target
4Wants=rpcbind.target
5Before=rpcbind.target
6
7[Service]
8Type=forking
9EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
10ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
11Restart=always
12
13[Install]
14WantedBy=multi-user.target
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
index be2897cdb4..a75e4e1bf6 100644
--- a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
@@ -15,6 +15,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
15 file://fix_host_path.patch \ 15 file://fix_host_path.patch \
16 file://obsolete_automake_macros.patch \ 16 file://obsolete_automake_macros.patch \
17 ${UCLIBCPATCHES} \ 17 ${UCLIBCPATCHES} \
18 file://rpcbind.conf \
19 file://rpcbind.service \
18 " 20 "
19 21
20UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \ 22UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \
@@ -27,7 +29,7 @@ SRC_URI[sha256sum] = "c92f263e0353887f16379d7708ef1fb4c7eedcf20448bc1e4838f59497
27 29
28PR = "r4" 30PR = "r4"
29 31
30inherit autotools update-rc.d 32inherit autotools update-rc.d systemd
31 33
32PACKAGECONFIG ??= "tcp-wrappers" 34PACKAGECONFIG ??= "tcp-wrappers"
33PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" 35PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
@@ -35,6 +37,11 @@ PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
35INITSCRIPT_NAME = "rpcbind" 37INITSCRIPT_NAME = "rpcbind"
36INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ." 38INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
37 39
40SYSTEMD_SERVICE_${PN} = "rpcbind.service"
41SYSTEMD_AUTO_ENABLE = "disable"
42
43EXTRA_OECONF += " --enable-warmstarts "
44
38do_install_append () { 45do_install_append () {
39 mv ${D}${bindir} ${D}${sbindir} 46 mv ${D}${bindir} ${D}${sbindir}
40 47
@@ -43,4 +50,11 @@ do_install_append () {
43 -e 's,/sbin/,${sbindir}/,g' \ 50 -e 's,/sbin/,${sbindir}/,g' \
44 ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind 51 ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
45 chmod 0755 ${D}${sysconfdir}/init.d/rpcbind 52 chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
53
54 install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
55 install -d ${D}${systemd_unitdir}/system
56 install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
57 sed -i -e 's,@SBINDIR@,${sbindir},g' \
58 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
59 ${D}${systemd_unitdir}/system/rpcbind.service
46} 60}