X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils%2Fexportfs%2Fexportfs.c;h=cbb0aa9ad859f55dca774a56939c9a3eb695d3d8;hb=refs%2Ftags%2Fnfs-utils-1-0-5;hp=51965645203c77c886d01f4a7348eff362438ccf;hpb=317522198e1493fe0f1b10614ff2f3a582a9aaff;p=nfs-utils.git diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index 5196564..cbb0aa9 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -91,16 +91,22 @@ main(int argc, char **argv) fprintf(stderr, "exportfs: -r and -u are incompatible.\n"); return 1; } - if (optind == argc && ! f_all) + new_cache = check_new_cache(); + if (optind == argc && ! f_all) { if (force_flush) { - cache_flush(1); + if (new_cache) + cache_flush(1); + else { + fprintf(stderr, "exportfs: -f: only available with new cache controls: mount /proc/fs/nfs first\n"); + exit(1); + } + return 0; } else { xtab_export_read(); dump(f_verbose); return 0; } - - new_cache = check_new_cache(); + } if (f_export && ! f_ignore) export_read(_PATH_EXPORTS);