diff mbox series

nfs-utils: Don't start nfs-statsd.service without exports

Message ID 20230912145630.1553461-1-JPEWhacker@gmail.com
State Accepted, archived
Commit 5fae759ff99ccd6e3473cb8aa638fbb23f7583ff
Headers show
Series nfs-utils: Don't start nfs-statsd.service without exports | expand

Commit Message

Joshua Watt Sept. 12, 2023, 2:56 p.m. UTC
Adds a `ConditionPathExists` to nfs-statsd.service. This allows it to
match the other NFS services and not start if nothing is exported.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
index 4fa64e19980..d1ac785b04b 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
@@ -4,6 +4,7 @@  DefaultDependencies=no
 Conflicts=umount.target
 Requires=nss-lookup.target rpcbind.service
 After=network.target nss-lookup.target rpcbind.service
+ConditionPathExists=@SYSCONFDIR@/exports
 
 [Service]
 EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf