I need a platform-independent and lightweight way of detecting the mount type of my CWD. Specifically, I need to determine if my CWD is in an SSHFS, NFS, CIFS, SMB, or local block store mount.
I need to do this on Mac OSX 10.6, 10.7, and RHEL5 (at minimum).
There's a possibility of using df, but df behaves quite differently on these two platforms. Plus, I'd have to CLI scrape its output with awk, which while workable is... fragile.
This info must be available on some level. Is there a tool that I'm unaware of that could provide this information to me?