In my script, I have several layers of statusing:
- remote is available (ping)
- remote NFS service is active
- remote NFS is exporting a certain directory
- remote NFS is mounted (mount)
For (2) and (3), I believe rcpinfo is the best bet. For (2) though, I cannot figure out how to narrow my query to the NFS service without starting a subshell (which is not acceptable for this application). For (3), I'm not sure this information is even available remotely (without sshing in, of course).
I'm working on RHEL 6 and have no access to programs that are not included in the standard distribution.