diff options
author | Ming Liu <ming.liu@toradex.com> | 2020-07-10 16:31:30 +0200 |
---|---|---|
committer | Ming Liu <ming.liu@toradex.com> | 2020-07-10 16:36:32 +0200 |
commit | 92fbc4533b692e2c4b88a9df73b3398bececd158 (patch) | |
tree | fefe021c52084594b1985275243b227925c7f422 /recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service | |
parent | 254c1f3d2f0482864b3402b25788819cb6bb3858 (diff) | |
download | meta-updater-92fbc4533b692e2c4b88a9df73b3398bececd158.tar.gz |
nfs-utils: fix nfs systemd daemons runtime issues
nfs-mountd.service and nfs-statd.service rely on /var/lib/nfs to be
present in rootfs, or else they would run into problems for some files
missing in it.
But a ostree/ota rootfs does not have that directory (removed during
do_image), to fix that, we now copy them to /var/local/lib/nfs and
mount it to /var/lib/nfs at runtime, which is done in
nfs-home-mount.service.
nfs-mountd.service and nfs-statd.service need run after
nfs-home-mount.service.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
Diffstat (limited to 'recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service')
-rw-r--r-- | recipes-connectivity/nfs-utils/nfs-utils/nfs-home-mount.service | 13 |
1 files changed, 13 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 | ||