X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fexportfs%2Fexportfs.c;h=290d8b25454b7317c3c323bb1f02b9964934bdb8;hp=fe0f6bac5e188d302ec2b40bc2e862ed8dc855df;hb=9c8dfab04dcf5f5067061703d6cd08ee408eec8f;hpb=3094278cd11c3c18d5426210e09e3c903a7a41a3 diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index fe0f6ba..290d8b2 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; } + 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/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); @@ -367,7 +373,7 @@ dump(int verbose) c = dumpopt(c, "wdelay"); if (ep->e_flags & NFSEXP_NOHIDE) c = dumpopt(c, "nohide"); - if (ep->e_flags & NFSEXP_CROSSMNT) + if (ep->e_flags & NFSEXP_CROSSMOUNT) c = dumpopt(c, "crossmnt"); if (ep->e_flags & NFSEXP_INSECURE_PORT) c = dumpopt(c, "insecure");