GNU Info

Info Node: (am-utils.info)Program Filesystem

(am-utils.info)Program Filesystem


Next: Symbolic Link Filesystem Prev: User ID Mapping Filesystem Up: Filesystem Types
Enter node , (file) or (file)node

Program Filesystem (`program')
==============================

   The "program" (`type:=program') filesystem type allows a program to
be run whenever a mount or unmount is required.  This allows easy
addition of support for other filesystem types, such as MIT's Remote
Virtual Disk (RVD) which has a programmatic interface via the commands
`rvdmount' and `rvdunmount'.

The following options must be specified:

`mount'
     the program which will perform the mount.

`unmount'
     the program which will perform the unmount.

   The exit code from these two programs is interpreted as a Unix error
code.  As usual, exit code zero indicates success.  To execute the
program Amd splits the string on whitespace to create an array of
substrings.  Single quotes `'' can be used to quote whitespace if that
is required in an argument.  There is no way to escape or change the
quote character.

   To run the program `rvdmount' with a host name and filesystem as
arguments would be specified by
`fs:=${autodir}${path};mount:="/etc/rvdmount rvdmount fserver ${fs}"'.

   The first element in the array is taken as the pathname of the
program to execute.  The other members of the array form the argument
vector to be passed to the program, "including argument zero".  This
means that the split string must have at least two elements.  The
program is directly executed by Amd, not via a shell.  This means that
scripts must begin with a `#!' interpreter specification.

   If a filesystem type is to be heavily used, it may be worthwhile
adding a new filesystem type into Amd, but for most uses the program
filesystem should suffice.

   When the program is run, standard input and standard error are
inherited from the current values used by Amd.  Standard output is a
duplicate of standard error.  The value specified with the `-l' command
line option has no effect on standard error.


automatically generated by info2www version 1.2.2.9