- if (! (flags & (MS_USERS | MS_USER))) {
- fprintf(stderr, "%s: permission denied\n", progname);
- exit(1);
- }
- }
-
- if (chk_mountpoint(mount_point))
- exit(EX_FAIL);
-
- if (strcmp(fs_type, "nfs4") == 0)
- mnt_err = nfs4mount(spec, mount_point, &flags, &extra_opts, &mount_opts, 0);
- else {
- int need_statd = 0;
- mnt_err = nfsmount(spec, mount_point, &flags,
- &extra_opts, &mount_opts,
- 0, &need_statd);
- if (!mnt_err && !fake && need_statd) {
- if (!start_statd()) {
- fprintf(stderr,
- "%s: rpc.statd is not running but is "
- "required for remote locking\n"
- " Either use \"-o nolocks\" to keep "
- "locks local, or start statd.\n",
- progname);
- exit(1);
- }
+ if (!(flags & (MS_USERS|MS_USER))) {
+ nfs_error(_("%s: permission denied"), progname);
+ mnt_err = EX_USAGE;
+ goto out;