X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fexportfs%2Fexportfs.c;h=6f2a60d7d4bddd20f321df402f281d6d8a68985a;hp=ab8a4a23bec6618283b3cfbbdca4181199c71df4;hb=e09fbc8933961a0a774217ef32d73da373ddc670;hpb=f68785e72129ab643d6c793bd5a11bdf0010eff9 diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index ab8a4a2..6f2a60d 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -91,14 +91,23 @@ main(int argc, char **argv) fprintf(stderr, "exportfs: -r and -u are incompatible.\n"); return 1; } + new_cache = check_new_cache(); if (optind == argc && ! f_all) { - xtab_export_read(); - dump(f_verbose); - return 0; + if (force_flush) { + if (new_cache) + cache_flush(1); + else { + fprintf(stderr, "exportfs: -f: only available with new cache controls: mount /proc/fs/nfsd 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); if (f_export) {