summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2020-07-14 09:41:19 +0200
committerGitHub <noreply@github.com>2020-07-14 09:41:19 +0200
commit5f7f0d139b3c81e163ad46d366cf1d843c3cb793 (patch)
tree2e5aa36f976c8ceb5e05ef6f2398a3c9353865f4
parentbb5abcc666842531da13050a5acaf7e95b066cfc (diff)
parent92fbc4533b692e2c4b88a9df73b3398bececd158 (diff)
downloadmeta-updater-5f7f0d139b3c81e163ad46d366cf1d843c3cb793.tar.gz
Merge pull request #753 from liuming50/fix-nfs-utils-issues
nfs-utils: fix nfs systemd daemons runtime issues
-rw-r--r--recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service13
-rw-r--r--recipes-connectivity/nfs-utils/nfs-utils_%.bbappend25
2 files changed, 38 insertions, 0 deletions
diff --git a/recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service b/recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service
new file mode 100644
index 0000000..514151a
--- /dev/null
+++ b/recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service
@@ -0,0 +1,13 @@
1[Unit]
2Description=NFS home mount @LOCALSTATEDIR@/local/lib/nfs -> @LOCALSTATEDIR@/lib/nfs.
3DefaultDependencies=no
4Conflicts=umount.target
5After=local-fs.target
6
7[Service]
8ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/nfs
9ExecStart=@BASE_BINDIR@/mount -o bind @LOCALSTATEDIR@/local/lib/nfs @LOCALSTATEDIR@/lib/nfs
10RemainAfterExit=yes
11
12[Install]
13WantedBy=multi-user.target
diff --git a/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend b/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend
new file mode 100644
index 0000000..2304ab4
--- /dev/null
+++ b/recipes-connectivity/nfs-utils/nfs-utils_%.bbappend
@@ -0,0 +1,25 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
2
3SRC_URI += "file://nfs-home-mount.service"
4
5SYSTEMD_SERVICE_${PN} += "nfs-home-mount.service"
6
7CONFFILES_${PN}-client += "${localstatedir}/local/lib"
8
9do_install_append_sota () {
10 install -d ${D}${localstatedir}/local
11 cp -aPR ${D}${localstatedir}/lib ${D}${localstatedir}/local
12
13 install -m 0644 ${WORKDIR}/nfs-home-mount.service ${D}${systemd_unitdir}/system/
14 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
15 -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
16 ${D}${systemd_unitdir}/system/nfs-home-mount.service
17
18 sed -i -e '0,/Requires=/{s,Requires=\(.*\),Requires=\1 nfs-home-mount.service,}' \
19 -e '0,/After=/{s,After=\(.*\),After=\1 nfs-home-mount.service,}' \
20 ${D}${systemd_unitdir}/system/nfs-statd.service
21
22 sed -i -e '0,/Requires=/{s,Requires=\(.*\),Requires=\1 nfs-home-mount.service,}' \
23 -e '0,/After=/{s,After=\(.*\),After=\1 nfs-home-mount.service,}' \
24 ${D}${systemd_unitdir}/system/nfs-mountd.service
25}