nfs-utils: Add StateDirectory for systemd services
PATCH 1/1 nfs-utils: Add StateDirectory for systemd services
Adds StateDirectory=nfs for the systemd service. This ensures that 1) and .mount services required for /var/lib/nfs are started before these services, and 2) that /var/lib/nfs exists before starting the services.
Signed-off-by Joshua Watt <[email protected]>
--- meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service | 1 + meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service | 1 + meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service | 1 + 3 files changed, 3 insertions(+)
meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service +1 -0
@@ -12,6 +12,7 @@ ConditionPathExists=@SYSCONFDIR@/exports EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf ExecStart=@SBINDIR@/rpc.mountd -F $MOUNTD_OPTS LimitNOFILE=@HIGH_RLIMIT_NOFILE@ +StateDirectory=nfs [Install] WantedBy=multi-user.target
meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service +1 -0
@@ -18,6 +18,7 @@ ExecStopPost=@SBINDIR@/exportfs -au ExecStopPost=@SBINDIR@/exportfs -f ExecReload=@SBINDIR@/exportfs -r RemainAfterExit=yes +StateDirectory=nfs [Install] WantedBy=multi-user.target
meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service +1 -0
@@ -10,6 +10,7 @@ ConditionPathExists=@SYSCONFDIR@/exports EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf ExecStart=@SBINDIR@/rpc.statd -F $STATD_OPTS LimitNOFILE=@HIGH_RLIMIT_NOFILE@ +StateDirectory=nfs [Install] WantedBy=multi-user.target
Signature · 1 line
2.34.1