From 076dd803330d93819c6e7862f515a8fa3997a83b Mon Sep 17 00:00:00 2001 From: Henrique Martins Date: Tue, 4 Nov 2014 15:12:16 -0500 Subject: exportfs: changes handling of unresolvable entries The patch to nfs/exportfs to allow nfsd to start when there are some, but not all, unresolvable entries in /etc/exports. Signed-off-by: Henrique Martins Signed-off-by: Steve Dickson --- support/export/export.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'support/export/export.c') diff --git a/support/export/export.c b/support/export/export.c index 6b1d045..ce714d4 100644 --- a/support/export/export.c +++ b/support/export/export.c @@ -76,15 +76,22 @@ export_read(char *fname) struct exportent *eep; nfs_export *exp; + int volumes = 0; + setexportent(fname, "r"); while ((eep = getexportent(0,1)) != NULL) { exp = export_lookup(eep->e_hostname, eep->e_path, 0); - if (!exp) - export_create(eep, 0); + if (!exp) { + exp = export_create(eep, 0); + if (exp) + volumes++; + } else warn_duplicated_exports(exp, eep); } endexportent(); + if (volumes == 0) + xlog(L_ERROR, "No file systems exported!"); } /** -- cgit