Thanks! I just finished testing 2 conditions:
1) Removing the if statement altogether. What I found is that the share still does get exported globally. So no dice there.
2) Changing the value from "all-hosts" to "no-hosts" to test if this was also a command option. It's not but I found something useful. Here's what the /etc/exports entry looks like with no changes at all (what I can't use):
/vol/frank/dave -sec=sys,rw
This of course is globally accessible by all as read-write. But with with the code value changed to "no-hosts" this is what I got:
/vol/frank/dave -sec=sys,rw=no-hosts
So, this means that if the value of this variable isn't set to a command option (like all-hosts) it'll just set the rw client to that value. It could therefore be useful to put something like "not.currently.accessed" or something equivalent so it's explanatory and at the same time preventing any access.
I haven't had a chance to test your suggestion about the isValid function but I like that too. I need to determine if we're okay with having these entries in the exports file that imply it's not currently being used.