X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils%2Fmount%2Fnfs4mount.c;h=2b0fe2e30c50de63b1a2c92b2ef69440e6760c06;hb=4f101548ef4990979400b7095e199c30204b100a;hp=af70551f595e696a01a2a9bfbe98a53a1f87736d;hpb=5f7cc524008a7dc548a71f4c7b0d39759371a37a;p=nfs-utils.git diff --git a/utils/mount/nfs4mount.c b/utils/mount/nfs4mount.c index af70551..2b0fe2e 100644 --- a/utils/mount/nfs4mount.c +++ b/utils/mount/nfs4mount.c @@ -188,10 +188,9 @@ int nfs4mount(const char *spec, const char *node, int flags, int bg, soft, intr; int nocto, noac, unshared; int retry; - int retval; + int retval = EX_FAIL; time_t timeout, t; - retval = EX_FAIL; if (strlen(spec) >= sizeof(hostdir)) { nfs_error(_("%s: excessively long host:dir argument\n"), progname); @@ -443,6 +442,13 @@ int nfs4mount(const char *spec, const char *node, int flags, rpc_mount_errors(hostname, 0, bg); goto fail; } + + if (bg && !running_bg) { + if (retry > 0) + retval = EX_BG; + goto fail; + } + t = time(NULL); if (t >= timeout) { rpc_mount_errors(hostname, 0, bg);