diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-09-14 14:48:52 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-16 22:12:30 +0100 |
commit | cc44cb2888f1ddecdd01d7bc414f7ac3043d1372 (patch) | |
tree | 7c5de4ffa2a4a423e84570fe80d6bf884ef0d64b /meta/recipes-connectivity | |
parent | 93845fe60d89c0592a5c1ed631fc737c724cbc5b (diff) | |
download | openembedded-core-cc44cb2888f1ddecdd01d7bc414f7ac3043d1372.tar.gz openembedded-core-cc44cb2888f1ddecdd01d7bc414f7ac3043d1372.tar.bz2 openembedded-core-cc44cb2888f1ddecdd01d7bc414f7ac3043d1372.zip |
portmap: add systemd service file
Add systemd service file for systemd support.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r-- | meta/recipes-connectivity/portmap/portmap.inc | 5 | ||||
-rw-r--r-- | meta/recipes-connectivity/portmap/portmap/portmap.service | 10 | ||||
-rw-r--r-- | meta/recipes-connectivity/portmap/portmap_6.0.bb | 7 |
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 \ ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz \ file://portmap.init \ file://make.patch;apply=yes" + S = "${WORKDIR}/portmap_5beta" INITSCRIPT_NAME = "portmap" INITSCRIPT_PARAMS = "start 10 2 3 4 5 . stop 32 0 1 6 ." -inherit update-rc.d +inherit update-rc.d systemd + +SYSTEMD_SERVICE_${PN} = "portmap.service" sbindir = "/sbin" 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 @@ +[Unit] +Description=The RPC portmapper +After=network.target + +[Service] +Type=forking +ExecStart=@BASE_SBINDIR@/portmap + +[Install] +WantedBy=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" SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \ file://destdir-no-strip.patch \ file://tcpd-config.patch \ - file://portmap.init" + file://portmap.init \ + file://portmap.service" SRC_URI[md5sum] = "ac108ab68bf0f34477f8317791aaf1ff" SRC_URI[sha256sum] = "02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de" @@ -23,4 +24,8 @@ fakeroot do_install() { install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap oe_runmake install DESTDIR=${D} + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/portmap.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/portmap.service } |