Update: The specification provided in the answer below negates the actual question, that is it applies to a broader scope of specifications, thereby eliminating the need for this question (see answer).
I'm struggling to find cohesive documentation on this one. Basically, I would like to know, with references where possible, what the standards are for an executable mounting a volume. To clarify: I'm looking for a specification. Below are some examples:
*. The executable *may* mount a volume at a subdirectory of the path provided by the caller (say it's not an empty directory), eg $ARGX/$NEWPLACE *. The executable *cannot* create directories ever. *. The executable *cannot* create directories unless specified by the caller. *. The executable *may* create directories specified by the caller if they do not exist. *. The executable *must* mount a volume at /mnt/$OTHERPATH if the mount point passed by the caller is unavailable. *. The executable *cannot* mount a volume at $BADPATH, $WORSEPATH, and the like, even if specified by the caller. *. The caller *expects* the volume mounted at $ARGX *. The caller *expects* to be alerted if the mount point is not empty *. The caller *expects* the executable to abort on all errors.
The reason is, just looking at various distros, not only have they changed over the years, but they each have their own opinion of where things go (slight tangent here: Wouldn't /mnt/$USER/$VOLUME be a better global solution to the hierarchy since /mnt was originally for mounting things and having a separate directory for each user would function the way /home/$USER/ does?). Back on topic, I want to remain as distribution-agnostic as possible (which I realise is like asking to make all of the people happy all of the time) so any "Specification" would be appreciated. Thanks.