diff options
author | Neil Brown <neilb@suse.de> | 2007-03-16 16:50:11 +1100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-03-16 16:50:11 +1100 |
commit | d80e49e559da01cd0b4cb23eb9e2351aca7e2ec5 (patch) | |
tree | e1ccfc9cdced7d35be83c9a97d323b351b62ccbb | |
parent | 880305fe1659ab289a917c7627aa014343f46bc9 (diff) | |
download | nfs-utils-d80e49e559da01cd0b4cb23eb9e2351aca7e2ec5.tar.gz nfs-utils-d80e49e559da01cd0b4cb23eb9e2351aca7e2ec5.tar.xz nfs-utils-d80e49e559da01cd0b4cb23eb9e2351aca7e2ec5.zip |
On "umount --lazy", don't tell the server we have unmounted.
Because, ofcourse, we haven't.
When we do finally let-go of the mount, the server won't get told,
but the same would happen on a crash, and the server just has to cope.
-rw-r--r-- | utils/mount/nfsumount.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c index 077219d..4208ade 100644 --- a/utils/mount/nfsumount.c +++ b/utils/mount/nfsumount.c @@ -324,16 +324,17 @@ int nfsumount(int argc, char *argv[]) if (!mc && verbose) printf(_("Could not find %s in mtab\n"), spec); + ret = 0; if (mc) { - ret = _nfsumount(mc->m.mnt_fsname, mc->m.mnt_opts); + if (!lazy) + ret = _nfsumount(mc->m.mnt_fsname, mc->m.mnt_opts); if(ret) ret = del_mtab(mc->m.mnt_fsname, mc->m.mnt_dir); - } else { - if (*spec != '/') + } else if (*spec != '/') { + if (!lazy) ret = _nfsumount(spec, "tcp,v3"); - else - ret = del_mtab(NULL, spec); - } + } else + ret = del_mtab(NULL, spec); return(ret); } |