Using HP-UX Internet Services (August 2003)

Distributing Files Using rdist
Creating the distfile
Chapter 5 43
variable_name
Specifies the name used to reference the variable.
name_list
Contains item names separated by a space and
enclosed within parentheses.
Spaces or tabs on either side of the equals (=) sign are ignored.
Subsequent appearances of the ${
variable_name
} in the distfile
(except in comments) are replaced by
name_list
. (You can omit braces if
the
variable_name
consists of just one character.)
You can also specify variable definitions on the command line while
invoking rdist; variable definitions on the command line override the
definitions in the distfile (see “Starting rdist” on page 50).
The following are examples of 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 variable definition entries in the distfile are described as follows:
The first entry defines the variable HOSTS to represent two remote
hosts, matisse and arpa, that are to be updated. If you specify a
remote host 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 the
shorthand form that represent the files /usr/include/*.h,
/usr/include/stand/*.h, /usr/include/sys/*.h,
/usr/include/vax*/*.h and so on. The * character is used as a
wildcard. 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
must not be updated on the remote hosts.
The following sections provide examples on how the variables are used in
the distfile command entries.