diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2020-07-14 09:41:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 09:41:19 +0200 |
commit | 5f7f0d139b3c81e163ad46d366cf1d843c3cb793 (patch) | |
tree | 2e5aa36f976c8ceb5e05ef6f2398a3c9353865f4 | |
parent | bb5abcc666842531da13050a5acaf7e95b066cfc (diff) | |
parent | 92fbc4533b692e2c4b88a9df73b3398bececd158 (diff) | |
download | meta-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.service | 13 | ||||
-rw-r--r-- | recipes-connectivity/nfs-utils/nfs-utils_%.bbappend | 25 |
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] | ||
2 | Description=NFS home mount @LOCALSTATEDIR@/local/lib/nfs -> @LOCALSTATEDIR@/lib/nfs. | ||
3 | DefaultDependencies=no | ||
4 | Conflicts=umount.target | ||
5 | After=local-fs.target | ||
6 | |||
7 | [Service] | ||
8 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/nfs | ||
9 | ExecStart=@BASE_BINDIR@/mount -o bind @LOCALSTATEDIR@/local/lib/nfs @LOCALSTATEDIR@/lib/nfs | ||
10 | RemainAfterExit=yes | ||
11 | |||
12 | [Install] | ||
13 | WantedBy=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 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" | ||
2 | |||
3 | SRC_URI += "file://nfs-home-mount.service" | ||
4 | |||
5 | SYSTEMD_SERVICE_${PN} += "nfs-home-mount.service" | ||
6 | |||
7 | CONFFILES_${PN}-client += "${localstatedir}/local/lib" | ||
8 | |||
9 | do_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 | } | ||