I've got a `bash` script that deals with files in Mac OS X 10.5 & 10.6. It now needs to determine whether the files are on a local volume or a remote AFP volume. All mountpoints are in `/Volumes` on Mac OS X, but I cannot see any difference between local & remote volumes, at least with `ls -al` (except for the boot volume, which is a symlink to `/`).

Is there a way to programatically, esp. something that can be easily called from a `bash` script (I *really* don't want to rewrite this in C/Obj-C with OS X-specific APIs, unless absolutely necessary), to determine the *source* or type of a mountpoint? Even what device a volume maps to (assuming volumes mounted with `mount_afp`, `mount_smbfs`, `mount_webdav`, etc., won't point back to a device in `/dev`) so I have *some* way of guessing whether it's local or not?