summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-09-14 14:48:52 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-16 22:14:05 +0100
commit14adc48816bad158c04807ba1c6bb61978883b23 (patch)
treef21e0502de4f4cbb28d7d303db9a97777f922426
parentd11ec7ff01aed928d48f498457df456a9a784ed3 (diff)
downloadpoky-14adc48816bad158c04807ba1c6bb61978883b23.tar.gz
portmap: add systemd service file
Add systemd service file for systemd support. (From OE-Core rev: cc44cb2888f1ddecdd01d7bc414f7ac3043d1372) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-connectivity/portmap/portmap.inc5
-rw-r--r--meta/recipes-connectivity/portmap/portmap/portmap.service10
-rw-r--r--meta/recipes-connectivity/portmap/portmap_6.0.bb7
3 files changed, 20 insertions, 2 deletions
diff --git a/meta/recipes-connectivity/portmap/portmap.inc b/meta/recipes-connectivity/portmap/portmap.inc
index 9b42859212..f5f7fde8be 100644
--- a/meta/recipes-connectivity/portmap/portmap.inc
+++ b/meta/recipes-connectivity/portmap/portmap.inc
@@ -10,12 +10,15 @@ SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
10 ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz \ 10 ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz \
11 file://portmap.init \ 11 file://portmap.init \
12 file://make.patch;apply=yes" 12 file://make.patch;apply=yes"
13
13S = "${WORKDIR}/portmap_5beta" 14S = "${WORKDIR}/portmap_5beta"
14 15
15INITSCRIPT_NAME = "portmap" 16INITSCRIPT_NAME = "portmap"
16INITSCRIPT_PARAMS = "start 10 2 3 4 5 . stop 32 0 1 6 ." 17INITSCRIPT_PARAMS = "start 10 2 3 4 5 . stop 32 0 1 6 ."
17 18
18inherit update-rc.d 19inherit update-rc.d systemd
20
21SYSTEMD_SERVICE_${PN} = "portmap.service"
19 22
20sbindir = "/sbin" 23sbindir = "/sbin"
21 24
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.service b/meta/recipes-connectivity/portmap/portmap/portmap.service
new file mode 100644
index 0000000000..7ef9d7b02e
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap/portmap.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=The RPC portmapper
3After=network.target
4
5[Service]
6Type=forking
7ExecStart=@BASE_SBINDIR@/portmap
8
9[Install]
10WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/portmap/portmap_6.0.bb b/meta/recipes-connectivity/portmap/portmap_6.0.bb
index b0a9454c48..8b65a03346 100644
--- a/meta/recipes-connectivity/portmap/portmap_6.0.bb
+++ b/meta/recipes-connectivity/portmap/portmap_6.0.bb
@@ -5,7 +5,8 @@ PR = "r9"
5SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \ 5SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
6 file://destdir-no-strip.patch \ 6 file://destdir-no-strip.patch \
7 file://tcpd-config.patch \ 7 file://tcpd-config.patch \
8 file://portmap.init" 8 file://portmap.init \
9 file://portmap.service"
9 10
10SRC_URI[md5sum] = "ac108ab68bf0f34477f8317791aaf1ff" 11SRC_URI[md5sum] = "ac108ab68bf0f34477f8317791aaf1ff"
11SRC_URI[sha256sum] = "02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de" 12SRC_URI[sha256sum] = "02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de"
@@ -23,4 +24,8 @@ fakeroot do_install() {
23 install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d 24 install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
24 install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap 25 install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
25 oe_runmake install DESTDIR=${D} 26 oe_runmake install DESTDIR=${D}
27
28 install -d ${D}${systemd_unitdir}/system
29 install -m 0644 ${WORKDIR}/portmap.service ${D}${systemd_unitdir}/system
30 sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/portmap.service
26} 31}