Installing and Administering Internet Services

Chapter 10 325
Using rdist
Creating the Distfile
Spaces or tabs immediately to the left and right of the “=” are ignored.
Subsequent appearances of ${variable_name} in the distfile (except in
comments) are replaced by name_list. (Braces can be omitted if
variable_name consists of just one character.)
Variable definitions can also be specified in the command line when
invoking rdist; variable definitions in the command line override
definitions in the distfile. (See “Starting rdist” on page 330.)
The following are examples of three variable definition entries in a
distfile:
HOSTS = ( matisse root@arpa)
FILES = ( /bin /lib /usr/bin /usr/games
/usr/include/{*.h,{stand,sys,vax*,pascal,machine}/*.h
/usr/lib /usr/man/man? /usr/ucb
/usr/local/rdist `cat ./std-files` )
EXLIB = ( Mail.rc aliases aliases.dir aliases.pag crontab dshrc
sendmail.cf sendmail.fc sendmail.hf sendmail.st uucp vfont )
The first entry defines the variable HOSTS to represent two remote hosts,
matisse and arpa, that are to be updated. Note that if a remote host is
specified in the form user@host, user is the user name on host that is used
to update files and directories on that host. Otherwise, the user name on
the master host is used to update the remote host.
The second entry defines the variable FILES to represent the files and
directories to be updated on the remote hosts. The shell meta characters
{, }, and * in the second line of this entry are used in a “shorthand” that
represents the files /usr/include/*.h, /usr/include/stand/*.h,
/usr/include/sys/*.h, /usr/include/vax*/*.h, etc. The *
character is used as a wildcard. Note that you can use commands, such
as cat, within single backquotes (`) in the variable list.
The last entry defines the variable EXLIB to represent the files that
should not be updated on the remote hosts.
Examples of how variables are used in distfile command entries are
shown in the following sections.
File Distribution Commands
Distfile command entries that distribute files to a remote host are
specified in the following format:
[label:] source_list -> destination_list command_list ;