From: "Shakeel, Muhammad" <muhammad_shakeel@mentor.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 4/4] nfs-utils: Add systemd support
Date: Thu, 1 Aug 2013 16:43:22 +0500 [thread overview]
Message-ID: <1375357402-10147-4-git-send-email-muhammad_shakeel@mentor.com> (raw)
In-Reply-To: <1375357402-10147-1-git-send-email-muhammad_shakeel@mentor.com>
From: Muhammad Shakeel <muhammad_shakeel@mentor.com>
- Remove dependency on meta-systemd
Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
---
.../nfs-utils/nfs-utils/nfs-utils.service | 16 ++++++++++++++++
.../nfs-utils/nfs-utils_1.2.8.bb | 13 +++++++++++--
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.service
new file mode 100644
index 0000000..e480cc8
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=NFS Server
+Requires=rpcbind.service
+After=rpcbind.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/rpc.nfsd
+ExecStart=/usr/sbin/rpc.mountd
+ExecStart=/usr/sbin/rpc.statd
+ExecStart=/usr/sbin/exportfs -a
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb
index 40b897b..4149865 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb
@@ -15,7 +15,8 @@ RRECOMMENDS_${PN} = "kernel-module-nfsd"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.bz2 \
file://nfs-utils-1.0.6-uclibc.patch \
file://nfs-utils-1.2.3-sm-notify-res_init.patch \
- file://nfsserver"
+ file://nfsserver \
+ file://nfs-utils.service "
SRC_URI[md5sum] = "6e7d97de51e428a0b8698c16ca23db77"
SRC_URI[sha256sum] = "1cc8f02a633eddbf0a1d93421f331479c4cdab4c5ab33b8bf8c7c369f9156ac6"
@@ -31,7 +32,10 @@ INITSCRIPT_NAME = "nfsserver"
# in the shutdown levels, but that works fine.
INITSCRIPT_PARAMS = "defaults"
-inherit autotools update-rc.d
+inherit autotools update-rc.d systemd
+
+SYSTEMD_SERVICE_${PN} = "nfs-utils.service"
+SYSTEMD_AUTO_ENABLE = "disable"
# --enable-uuid is need for cross-compiling
EXTRA_OECONF = "--with-statduser=nobody \
@@ -65,6 +69,11 @@ do_install_append () {
install -d ${D}${sysconfdir}/init.d
install -d ${D}${localstatedir}/lib/nfs/statd
install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
+
+ install -d ${D}${systemd_unitdir}/system
+ install ${WORKDIR}/nfs-utils.service ${D}${systemd_unitdir}/system/
+ sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/nfs-utils.service
+
# kernel code as of 3.8 hard-codes this path as a default
install -d ${D}/var/lib/nfs/v4recovery
--
1.7.9.5
next prev parent reply other threads:[~2013-08-01 11:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 11:43 [PATCH 1/4] openssh: Add systemd support Shakeel, Muhammad
2013-08-01 11:43 ` [PATCH 2/4] lighttpd: " Shakeel, Muhammad
2013-08-01 11:43 ` [PATCH 3/4] rpcbind: " Shakeel, Muhammad
2013-08-01 12:34 ` Enrico Scholz
2013-08-01 11:43 ` Shakeel, Muhammad [this message]
2013-08-01 12:27 ` [PATCH 4/4] nfs-utils: " Enrico Scholz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1375357402-10147-4-git-send-email-muhammad_shakeel@mentor.com \
--to=muhammad_shakeel@mentor.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox