Skip to contentSkip to conversation

nfs-utils: Improve handling when no exported fileysystems

PATCH New Richard Purdie 1 participant 1 message Oct 24, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfs-utils: Improve handling when no exported fileysystems

Ensure /etc/exports exists and is readable before calling exportfs to avoid errors.

---
 meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver +1 -1
index d5e9c38a9c0..0f5747cc6db 100644
@@ -107,7 +107,7 @@ stop_nfsd(){
 #FIXME: need to create the /var/lib/nfs/... directories
 case "$1" in
   start)
-	exportfs -r
+	test -r /etc/exports && exportfs -r
 	start_nfsd "$NFS_SERVERS"
 	start_mountd
 	test -r /etc/exports && exportfs -a;;
Signature · 1 line
2.20.1