Installing and Administering Internet Services

324 Chapter 10
Using rdist
Creating the Distfile
Creating the Distfile
The distfile used by the master host contains a sequence of entries that
specify the files to be copied, the destination hosts, and the operations to
be performed to do the updating. Since a distfile is an ASCII file, you can
create it with any text editor. If you are familiar with the make program,
the structure of a distfile is somewhat similar to a makefile.
The following syntax rules apply:
Newlines, tabs, and blanks are used as separators and are ignored.
Comments begin with “#” and end with a newline.
Shell meta characters ([, ], {, }, *, and ?) are expanded on the master
host in the same way as with the csh command. Use a backslash (\)
to escape a meta character. (Type man 1 csh for more information.)
File names that do not begin with “/” or “˜” are assumed to be relative
to the user’s home directory on each remote host.
A distfile contains the following types of entries:
Definitions of variables to be used with distfile commands.
Commands that distribute files to other hosts.
Commands to create lists of files that have been changed since a
specified date.
Each of these types of entries is described in the following sections.
Variable Definitions
Variables can be used to represent a list of items, such as the names of
files to be distributed or the remote hosts to be updated. Variables can be
defined anywhere in the distfile, but they are usually grouped together at
the beginning of the file. Variables are then used in command entries.
The format for defining variables is:
variable_name = name_list
variable_name is a name by which the variable is referenced.
name_list consists of item names separated by white space, enclosed in
parentheses.