SRMAP(5)

NAME
srmap - network mapping file for SR

DESCRIPTION
Srmap is used to find the executable program when a virtual machine is created with an `on n' clause and an explicit pathname has not been given for machine n.

Srmap is read from a standard location; this may be overridden by supplying the name of a file in the environment variable SRMAP.

Lines in the file have two whitespace-separated fields, a pattern and a template. Lines with less than two fields are ignored. Comments are introduced by `#' and terminate at end of line.

When an SR program runs, a program location is defined by concatenating the hostname, a colon (:), and the absolute pathname of the executable. The hostname is chopped at the first `.', if any. The location is matched against each pattern in turn until one succeeds; then the corresponding template is used to form a network pathname. This pathname is passed to rsh(1) on the remote machine.

Patterns have the general form host:path, with these characters having special meaning:
    ?    matches any single character except `/'
    *    matches any string of characters except `/'
    **    matches any string of characters including `/'

Templates construct network file paths corresponding to matched patterns. Each occurrence of $n in a template is replaced by the characters matched by the nth ?, *, or ** in the corresponding pattern. n may be 1 to 9, or A to Z for the 10th through 35th strings.

EXAMPLE
Consider the mapping file:
    # sample mapping file
    *:/r/**	/r/$2	# already a network path
    client:/**	/r/server/$1	# client disks are on server
    ???*:/**	/r/$1$2$3/$5	# general rule for others

A program run on host `caslon.arizona.edu' generates these different network paths, depending on the program's path:
    local path	network path generated
    /r/bas/usr/abc/foo	/r/bas/usr/abc/foo
    /usr/xyz/bar	/r/cas/usr/xyz/bar

Note that `caslon:' was prepended to the program path before scanning the patterns.

CAVEATS
Srmap is designed for environments providing transparent access to remote disks via a systematic naming scheme. Other environments may require explicit path specification by the SR program.