diff options
author | Henrique Martins <linux@martins.cc> | 2014-11-04 15:12:16 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2014-11-04 15:13:37 -0500 |
commit | 076dd803330d93819c6e7862f515a8fa3997a83b (patch) | |
tree | 5dbe24b9537958c8b8d09ae906050691d02a109d /support/export/export.c | |
parent | 7afda720e48d774ccc02c7e6b97f05882bba3d06 (diff) | |
download | nfs-utils-076dd803330d93819c6e7862f515a8fa3997a83b.tar.gz nfs-utils-076dd803330d93819c6e7862f515a8fa3997a83b.tar.xz nfs-utils-076dd803330d93819c6e7862f515a8fa3997a83b.zip |
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 <linux@martins.cc>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/export/export.c')
-rw-r--r-- | support/export/export.c | 11 |
1 files changed, 9 insertions, 2 deletions
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!"); } /** |