Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts.
The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871 modified umount so that it doesn't remove any entry created by mount_nfs. Reported on freebsd-current@. Reported by: clbuisson@orange.fr MFC after: 2 weeks
This commit is contained in:
parent
930d3f4a60
commit
1362276303
@ -636,7 +636,7 @@ getnfsargs(char *spec, struct iovec **iov, int *iovlen)
|
||||
|
||||
build_iovec(iov, iovlen, "hostname", nam, (size_t)-1);
|
||||
/* Add mounted file system to PATH_MOUNTTAB */
|
||||
if (!add_mtab(hostp, spec))
|
||||
if (mountmode != V4 && !add_mtab(hostp, spec))
|
||||
warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec);
|
||||
return (1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user