[OE-core] [PATCH] nfs-utils: Improve handling when no exported fileysystems

Richard Purdie richard.purdie at linuxfoundation.org
Thu Oct 24 13:03:43 UTC 2019


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

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
index d5e9c38a9c0..0f5747cc6db 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
@@ -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;;
-- 
2.20.1



More information about the Openembedded-core mailing list