diff options
| -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 | } | ||
