From 703104c2789e96532daf25f1de27593f6b6d174a Mon Sep 17 00:00:00 2001 From: Muhammad Shakeel Date: Wed, 4 Sep 2013 11:05:02 +0000 Subject: nfs-utils: Add systemd support - Remove dependency on meta-systemd (From OE-Core rev: 644394c074c359505fcd750356fb4db58b939729) Signed-off-by: Muhammad Shakeel Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- .../nfs-utils/nfs-utils_1.2.8.bb | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb') 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 fd6d33efd7..e3e8136c27 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,11 @@ 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.conf \ + file://nfs-server.service \ + file://nfs-mountd.service \ + file://nfs-statd.service " SRC_URI[md5sum] = "6e7d97de51e428a0b8698c16ca23db77" SRC_URI[sha256sum] = "1cc8f02a633eddbf0a1d93421f331479c4cdab4c5ab33b8bf8c7c369f9156ac6" @@ -31,7 +35,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-server.service nfs-mountd.service nfs-statd.service" +SYSTEMD_AUTO_ENABLE = "disable" # --enable-uuid is need for cross-compiling EXTRA_OECONF = "--with-statduser=nobody \ @@ -65,6 +72,16 @@ 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 -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir} + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${systemd_unitdir}/system/*.service + # kernel code as of 3.8 hard-codes this path as a default install -d ${D}/var/lib/nfs/v4recovery -- cgit v1.2.3-54-g00ecf