Allow nfs onestart to work with NFSv4
I've had a few problems with disk encryption and NFS starting on boot, so I set the service to be started manually, which I do after entering the disk encryption key.
Unchecking "Start on boot" causes NFS 4 to not run when starting it manually. Mounting fails with:
mount_nfs -o tcp -o soft -o bg -o vers=4 freenas.local:/mnt/data/test test_nfs mount_nfs: can't mount /mnt/data/test from freenas.local onto /Users/andsens/Workspace/appliances/FreeNAS/test_nfs: RPC prog. not avail
Once I enable the service to start on boot and then restart the service, everything mounts fine.
sudo sh -c '(source /etc/rc.conf.local; echo $nfsv4_server_enable)'
yields only "YES" when that checkmark is set and
rpcinfo -p localhost
always only lists versions 2 & 3, but I believe that is because v4 doesn't need rpcbind.
I'm not sure which of the details above are relevant so I just put them all in there.
fix(middlewared/service): allow nfs onestart to work with NFSv4