[BACK]Return to rdist.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / rdist

Annotation of src/usr.bin/rdist/rdist.1, Revision 1.13

1.13    ! millert     1: .\"    $OpenBSD: rdist.1,v 1.12 2000/03/14 21:31:41 aaron Exp $
1.2       dm          2: .\"
                      3: .\" Copyright (c) 1983 Regents of the University of California.
                      4: .\" All rights reserved.
1.1       deraadt     5: .\"
                      6: .\" Redistribution and use in source and binary forms, with or without
                      7: .\" modification, are permitted provided that the following conditions
                      8: .\" are met:
                      9: .\" 1. Redistributions of source code must retain the above copyright
                     10: .\"    notice, this list of conditions and the following disclaimer.
                     11: .\" 2. Redistributions in binary form must reproduce the above copyright
                     12: .\"    notice, this list of conditions and the following disclaimer in the
                     13: .\"    documentation and/or other materials provided with the distribution.
                     14: .\" 3. All advertising materials mentioning features or use of this software
                     15: .\"    must display the following acknowledgement:
                     16: .\"    This product includes software developed by the University of
                     17: .\"    California, Berkeley and its contributors.
                     18: .\" 4. Neither the name of the University nor the names of its contributors
                     19: .\"    may be used to endorse or promote products derived from this software
                     20: .\"    without specific prior written permission.
                     21: .\"
                     22: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     23: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     24: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     25: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     26: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     27: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     28: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     29: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     30: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     31: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     32: .\" SUCH DAMAGE.
                     33: .\"
1.6       millert    34: .\"    $From: rdist.man,v 6.34 1996/01/29 22:37:19 mcooper Exp $
1.2       dm         35: .\"    @(#)rdist.1     6.6 (Berkeley) 5/13/86
1.1       deraadt    36: .\"
1.3       dm         37: .TH RDIST 1 "January 29, 1996"
1.2       dm         38: .UC 6
                     39: .SH NAME
                     40: rdist \- remote file distribution client program
                     41: .SH SYNOPSIS
                     42: .B rdist
1.8       aaron      43: [
1.2       dm         44: .B \-DFn
                     45: ]
1.8       aaron      46: [
                     47: .B \-A
                     48: .I num
                     49: ]
                     50: [
                     51: .B \-a
1.2       dm         52: .I num
1.8       aaron      53: ]
                     54: [
                     55: .B \-d
                     56: .I var=value
                     57: ]
                     58: [
1.2       dm         59: .B \-l
                     60: .I <local logopts>
1.8       aaron      61: ]
                     62: [
1.2       dm         63: .B \-L
                     64: .I <remote logopts>
1.8       aaron      65: ]
                     66: [
                     67: .B \-f
                     68: .I distfile
                     69: ]
                     70: [
                     71: .B \-M
1.2       dm         72: .I maxproc
                     73: ]
1.8       aaron      74: [
                     75: .B \-m
                     76: .I host
                     77: ]
                     78: [
1.2       dm         79: .B \-o
                     80: .I distopts
                     81: ]
1.8       aaron      82: [
                     83: .B \-t
                     84: .I timeout
                     85: ]
1.2       dm         86: [
                     87: .B \-p
                     88: .I <rdistd-path>
                     89: ]
                     90: [
                     91: .B \-P
                     92: .I <rsh-path>
                     93: ]
1.8       aaron      94: [
1.2       dm         95: .I name ...
                     96: ]
                     97: .PP
                     98: .B rdist
                     99: .B \-DFn
1.8       aaron     100: .B -c
                    101: .I name ...
1.2       dm        102: .I [login@]host[:dest]
                    103: .PP
                    104: .B rdist
                    105: .B \-Server
                    106: .PP
                    107: .B rdist
                    108: .B \-V
                    109: .SH DESCRIPTION
                    110: .I Rdist
1.8       aaron     111: is a program to maintain identical copies of files over multiple hosts.
1.1       deraadt   112: It preserves the owner, group, mode, and mtime of files if possible and
                    113: can update programs that are executing.
1.2       dm        114: .I Rdist
1.1       deraadt   115: reads commands from
1.2       dm        116: .I distfile
1.1       deraadt   117: to direct the updating of files and/or directories.
                    118: If
1.2       dm        119: .I distfile
                    120: is `\-', the standard input is used.
                    121: If no
                    122: .B \-f
                    123: option is present, the program looks first for `distfile',
                    124: then `Distfile' to use as the input.
1.1       deraadt   125: If no names are specified on the command line,
1.2       dm        126: .I rdist
1.1       deraadt   127: will update all of the files and directories listed in
1.2       dm        128: .IR distfile .
1.1       deraadt   129: Otherwise, the argument is taken to be the name of a file to be updated
                    130: or the label of a command to execute. If label and file names conflict,
                    131: it is assumed to be a label.
                    132: These may be used together to update specific files
                    133: using specific commands.
1.2       dm        134: .PP
                    135: The
                    136: .B \-c
                    137: option forces
                    138: .I rdist
1.1       deraadt   139: to interpret the remaining arguments as a small
1.2       dm        140: .IR distfile .
1.1       deraadt   141: The equivalent distfile is as follows.
1.2       dm        142: .nf
                    143:
                    144: .ti +.5i
                    145: ( \fIname\fP ... ) -> [\fIlogin\fP@]\fIhost\fP
                    146: .ti +1i
                    147: install        [\fIdest\fP] ;
                    148:
                    149: .fi
                    150: .PP
                    151: The
                    152: .B \-Server
                    153: option is recognized to provide partial backward compatible support
                    154: for older versions of
                    155: .I rdist
                    156: which used this option to put
                    157: .I rdist
                    158: into server mode.
                    159: If
                    160: .I rdist
1.8       aaron     161: is started with the
1.2       dm        162: .B \-Server
                    163: command line option, it will attempt to exec (run) the old version of
1.13    ! millert   164: .I rdist,
        !           165: .I /usr/bin/oldrdist.
1.2       dm        166: .PP
                    167: .I Rdist
1.13    ! millert   168: uses a remote shell command to access each target host.
        !           169: By default,
        !           170: .B ssh
        !           171: is used, unless overridden by the
        !           172: .I \-P
        !           173: option or the RSH environment variable.
        !           174: If the target host is the string
1.2       dm        175: .B localhost
1.8       aaron     176: and
1.2       dm        177: the remote user name is the same as the local user name,
                    178: .I rdist
                    179: will run the command
                    180: .nf
                    181: .sp
                    182: .RS
                    183: .B "/bin/sh -c rdistd -S"
                    184: .RE
                    185: .sp
                    186: .fi
                    187: Otherwise
                    188: .I rdist
                    189: run will run the command
                    190: .nf
                    191: .sp
                    192: .RS
1.13    ! millert   193: \fBssh \fIhost\fB -l \fIremuser \fBrdistd -S\fR
1.2       dm        194: .RE
                    195: .sp
                    196: .fi
1.8       aaron     197: where
1.2       dm        198: .I host
                    199: is the name of the target host,
                    200: .I remuser
                    201: is the name of the user to make the connection as and,
                    202: .I rdistd
                    203: is the rdist server command on the target host as shown below.
                    204: .PP
                    205: On each target host
                    206: .I Rdist
                    207: will attempt to run the command
                    208: .nf
                    209: .sp
                    210: .RS
                    211: .I "rdistd -S"
                    212: .RE
                    213: .sp
                    214: .fi
                    215: or
                    216: .nf
                    217: .sp
                    218: .RS
                    219: .I "<rdistd path> -S"
                    220: .RE
                    221: .sp
                    222: .fi
                    223: if the
                    224: .I \-p
                    225: option was specified.
                    226: If no
1.8       aaron     227: .B \-p
1.2       dm        228: option is included,
                    229: or the
                    230: .I <rdistd path>
                    231: is a simple filename,
                    232: .I rdistd
                    233: or
                    234: .I <rdistd path>
1.8       aaron     235: must be somewhere in the
1.2       dm        236: .B $PATH
                    237: of the user running
                    238: .B rdist
                    239: on the remote (target) host.
                    240: .SH OPTIONS
                    241: .TP
                    242: .B "\-A \fInum\fR"
                    243: Set the minimum number of free files (inodes) on a filesystem that must exist
1.8       aaron     244: for
1.2       dm        245: .I rdist
                    246: to update or install a file.
                    247: .TP
                    248: .B "\-a \fInum\fR"
                    249: Set the minimum amount of free space (in bytes) on a filesystem that must exist
1.8       aaron     250: for
1.2       dm        251: .I rdist
                    252: to update or install a file.
                    253: .TP
                    254: .B \-D
                    255: Enable copious debugging messages.
                    256: .TP
                    257: .B "\-d \fIvar=value\fR"
1.1       deraadt   258: Define
1.2       dm        259: .I var
1.1       deraadt   260: to have
1.2       dm        261: .IR value .
                    262: This
1.1       deraadt   263: option is used to define or override variable definitions in the
1.2       dm        264: .IR distfile .
                    265: .I Value
1.1       deraadt   266: can be the empty string, one name, or a list of names surrounded by
                    267: parentheses and separated by tabs and/or spaces.
1.2       dm        268: .TP
                    269: .B \-F
1.8       aaron     270: Do not fork any child
1.2       dm        271: .I rdist
                    272: processes.
                    273: All clients are updated sequentially.
                    274: .TP
                    275: .B "\-f \fIdistfile\fR"
                    276: Set the name of the distfile to use to be
                    277: .I distfile .
1.8       aaron     278: If
1.2       dm        279: .I distfile
                    280: is specified as
                    281: ``\-'' (dash)
                    282: then read from standard input (stdin).
                    283: .TP
                    284: .B "\-l \fIlogopts\fR"
                    285: Set local logging options.
1.8       aaron     286: See the section
1.2       dm        287: .B "MESSAGE LOGGING"
                    288: for details on the syntax for
                    289: .I logopts.
                    290: .TP
                    291: .B "\-L \fIlogopts\fR"
                    292: Set remote logging options.
                    293: .I logopts
                    294: is the same as for local logging
                    295: except the values are passed to the remote
                    296: server (\fIrdistd\fR).
1.8       aaron     297: See the section
1.2       dm        298: .B "MESSAGE LOGGING"
                    299: for details on the syntax for
                    300: .I logopts.
                    301: .TP
                    302: .B "\-M \fInum\fR"
                    303: Set the maximum number of simultaneously
                    304: running child
                    305: .I rdist
                    306: processes to
                    307: .I num.
                    308: The default is 4.
                    309: .TP
                    310: .B "\-m \fImachine\fR"
1.1       deraadt   311: Limit which machines are to be updated. Multiple
1.2       dm        312: .B \-m
1.1       deraadt   313: arguments can be given to limit updates to a subset of the hosts listed in the
1.2       dm        314: .IR distfile .
                    315: .TP
                    316: .B \-n
1.1       deraadt   317: Print the commands without executing them. This option is
                    318: useful for debugging
1.2       dm        319: .IR distfile .
                    320: .TP
                    321: .B "\-o\fIdistopts\fR"
                    322: Specify the dist options to enable.
                    323: .I distopts
                    324: is a comma separated list of options which are listed below.
                    325: The valid values for
                    326: .I distopts
                    327: are:
                    328: .RS
                    329: .IP \fBverify\fR
1.1       deraadt   330: Verify that the files are up to date on all the hosts. Any files
                    331: that are out of date will be displayed but no files will be changed
                    332: nor any mail sent.
1.2       dm        333: .IP \fBwhole\fR
1.1       deraadt   334: Whole mode. The whole file name is appended to the destination directory
1.2       dm        335: name.  Normally, only the last component of a name is used when renaming files.
1.1       deraadt   336: This will preserve the directory structure of the files being
                    337: copied instead of flattening the directory structure. For example,
1.2       dm        338: rdisting a list of files such as
1.8       aaron     339: .I /path/dir1/f1
1.2       dm        340: and
1.8       aaron     341: .I /path/dir2/f2
                    342: to
                    343: .I /tmp/dir
1.2       dm        344: would create
1.8       aaron     345: files
                    346: .I /tmp/dir/path/dir1/f1
                    347: and
                    348: .I /tmp/dir/path/dir2/f2
                    349: instead of
                    350: .I /tmp/dir/dir1/f1
                    351: and
1.2       dm        352: .I /tmp/dir/dir2/f2.
                    353: .IP \fBnoexec\fR
1.8       aaron     354: Automatically exclude executable files that are in
1.2       dm        355: .I a.out(5)
1.8       aaron     356: format from being checked or updated.
1.2       dm        357: .IP \fByounger\fR
1.1       deraadt   358: Younger mode. Files are normally updated if their
1.2       dm        359: .I mtime
1.1       deraadt   360: and
1.2       dm        361: .I size
1.1       deraadt   362: (see
1.2       dm        363: .IR stat (2))
                    364: disagree. This
1.1       deraadt   365: option causes
1.2       dm        366: .I rdist
1.1       deraadt   367: not to update files that are younger than the master copy.
                    368: This can be used
                    369: to prevent newer copies on other hosts from being replaced.
                    370: A warning message is printed for files which are newer than the master copy.
1.2       dm        371: .IP \fBcompare\fR
                    372: Binary comparison. Perform a binary comparison and update files if they differ
                    373: rather than comparing dates and sizes.
                    374: .IP \fBfollow\fR
                    375: Follow symbolic links. Copy the file that the link points to rather than the
                    376: link itself.
                    377: .IP \fBignlnks\fR
                    378: Ignore unresolved links.
                    379: .I Rdist
                    380: will normally try to maintain the link structure of files being transferred
                    381: and warn the user if all the links cannot be found.
                    382: .IP \fBchknfs\fR
                    383: Do not check or update files on target host that
                    384: reside on NFS filesystems.
                    385: .IP \fBchkreadonly\fR
                    386: Enable check on target host
                    387: to see if a file resides on a read-only filesystem.
                    388: If a file does, then no checking or updating of the file is attempted.
                    389: .IP \fBchksym\fR
                    390: If the target on the remote host is a symbolic link, but is not on the
                    391: master host, the remote target will be left a symbolic link.
                    392: This behavior is generally considered a bug in the original version of
                    393: .I rdist,
                    394: but is present to allow compatibility with older versions.
                    395: .IP \fBquiet\fR
                    396: Quiet mode. Files that are being modified are normally
                    397: printed on standard output. This
                    398: option suppresses this.
                    399: .IP \fBremove\fR
                    400: Remove extraneous files. If a directory is being updated, any files that exist
                    401: on the remote host that do not exist in the master directory are removed.
                    402: This is useful for maintaining truly identical copies of directories.
                    403: .IP \fBnochkowner\fR
                    404: Do not check user ownership of files that already exist.
                    405: The file ownership is only set when the file is updated.
                    406: .IP \fBnochkgroup\fR
                    407: Do not check group ownership of files that already exist.
                    408: The file ownership is only set when the file is updated.
                    409: .IP \fBnochkmode\fR
                    410: Do not check file and directory permission modes.
                    411: The permission mode is only set when the file is updated.
                    412: .IP \fBnodescend\fR
                    413: Do not descend into a directory.
1.8       aaron     414: Normally
1.2       dm        415: .I rdist
                    416: will recursively check directories.
                    417: If this option is enabled, then any files listed in the
                    418: file list in the distfile that are directories are not recursively scanned.
                    419: Only the existence, ownership, and mode of the directory are checked.
                    420: .IP \fBnumchkgroup\fR
1.9       aaron     421: Use the numeric group ID (GID) to check group ownership instead of
1.2       dm        422: the group name.
                    423: .IP \fBnumchkowner\fR
1.9       aaron     424: Use the numeric user ID (UID) to check user ownership instead of
1.2       dm        425: the user name.
                    426: .IP \fBsavetargets\fR
                    427: Save files that are updated instead of removing them.
                    428: Any target file that is updates is first rename from
                    429: .B file
                    430: to
                    431: .B file.OLD.
1.3       dm        432: .IP \fBsparse\fR
                    433: Enable checking for sparse (aka \fIwholely\fR) files.  One of the most
                    434: common types of sparse files are those produced by
                    435: .B ndbm(3).
                    436: This option adds some additional processing overhead so it should
                    437: only be enabled for targets likely to contain sparse files.
1.2       dm        438: .RE
                    439: .TP
                    440: .B "\-p \fI<rdistd-path>\fR"
                    441: Set the path where the rdistd server is searched for on the target host.
                    442: .TP
                    443: .B "\-P \fI<rsh-path>\fR"
1.8       aaron     444: Set the path to the
1.13    ! millert   445: .I ssh(1)
1.2       dm        446: command.
                    447: The
                    448: .I rsh-path
1.7       deraadt   449: may be a colon separated list of possible pathnames.
1.2       dm        450: In this case, the first component of the path to exist is used.
1.11      aaron     451: i.e.,
1.13    ! millert   452: .B "/usr/bin/ssh:/usr/bin/rsh",
        !           453: .B /usr/bin/ssh.
1.2       dm        454: .TP
                    455: .B "\-t \fItimeout\fR"
1.8       aaron     456: Set the timeout period (in seconds) for waiting for responses from the remote
1.2       dm        457: .I rdist
                    458: server.
                    459: The default is 900 seconds.
                    460: .TP
                    461: .B \-V
                    462: Print version information and exit.
                    463: .SH "MESSAGE LOGGING"
                    464: .I Rdist
                    465: uses a collection of predefined message
                    466: .B facilities
                    467: that each contain a list of message
                    468: .B types
1.8       aaron     469: specifying which types of messages to send to that
1.2       dm        470: .I facility.
                    471: The local client (\fIrdist\fR) and the remote server (\fIrdistd\fR) each
                    472: maintain
                    473: their own copy of what types of messages to log to what facilities.
                    474: .LP
1.8       aaron     475: The
1.2       dm        476: .B \-l
                    477: .I logopts
                    478: option to
                    479: .I rdist
                    480: tells
                    481: .I rdist
                    482: what logging options to use locally.
1.8       aaron     483: The
1.2       dm        484: .B \-L
                    485: .I logopts
                    486: option to
                    487: .I rdist
                    488: tells
                    489: .I rdist
                    490: what logging options to pass to the remote
                    491: .I rdistd
                    492: server.
                    493: .LP
                    494: The form of
                    495: .I logopts
                    496: should be of form
                    497: .sp
                    498: .RS
                    499: \fIfacility\fB=\fItypes\fB:\fIfacility\fB=\fItypes...
                    500: .RE
                    501: .sp
                    502: The valid facility names are:
                    503: .RS
                    504: .IP \fBstdout\fR
                    505: Messages to standard output.
                    506: .IP \fBfile\fR
1.8       aaron     507: Log to a file.  To specify the file name, use the format
1.2       dm        508: ``\fBfile=\fIfilename\fB=\fItypes\fR''.
1.12      aaron     509: e.g.,
1.2       dm        510: .B "``file=/tmp/rdist.log=all,debug''.
                    511: .IP \fBsyslog\fR
1.8       aaron     512: Use the
1.2       dm        513: .I syslogd(8)
                    514: facility.
                    515: .IP \fBnotify\fR
                    516: Use the internal
                    517: .I rdist
                    518: .B notify
                    519: facility.
                    520: This facility is used in conjunction with the
                    521: .B notify
1.8       aaron     522: keyword in a
1.2       dm        523: .I distfile
                    524: to specify what messages are mailed to the
                    525: .B notify
                    526: address.
                    527: .RE
                    528: .LP
                    529: .I types
1.8       aaron     530: should be a comma separated list of message types.  Each message type
1.2       dm        531: specified enables that message level.  This is unlike the
                    532: .I syslog(3)
                    533: system facility which uses an ascending order scheme.
                    534: The following
1.8       aaron     535: are the valid
1.2       dm        536: .I types:
                    537: .RS
                    538: .IP \fBchange\fR
                    539: Things that change.
                    540: This includes files that are installed or updated in some way.
                    541: .IP \fBinfo\fR
                    542: General information.
                    543: .IP \fBnotice\fR
                    544: General info about things that change.
                    545: This includes things like making directories which are needed in order
                    546: to install a specific target, but which are not explicitly specified in
                    547: the
                    548: .I distfile.
                    549: .IP \fBnerror\fR
                    550: Normal errors that are not fatal.
                    551: .IP \fBferror\fR
                    552: Fatal errors.
                    553: .IP \fBwarning\fR
                    554: Warnings about errors which are not as serious as
                    555: .B nerror
                    556: type messages.
                    557: .IP \fBdebug\fR
                    558: Debugging information.
                    559: .IP \fBall\fR
                    560: All but debug messages.
                    561: .RE
                    562: .LP
                    563: Here is a sample command line option:
                    564: .nf
                    565: .sp
                    566: .RS
                    567: \-l stdout=all:syslog=change,notice:file=/tmp/rdist.log=all
                    568: .RE
                    569: .sp
                    570: .fi
                    571: This entry will set local message logging to have all but debug
                    572: messages sent to standard output, change and notice messages will
1.8       aaron     573: be sent to
1.2       dm        574: .I syslog(3),
                    575: and all messages will be written to the file
                    576: .B /tmp/rdist.log.
                    577: .SH DISTFILES
                    578: .PP
                    579: The
                    580: .I distfile
1.1       deraadt   581: contains a sequence of entries that specify the files
                    582: to be copied, the destination hosts, and what operations to perform
                    583: to do the updating. Each entry has one of the following formats.
1.2       dm        584: .nf
                    585:
                    586: .RS
1.1       deraadt   587: <variable name> `=' <name list>
1.2       dm        588: [ label: ] <source list> `\->' <destination list> <command list>
                    589: [ label: ] <source list> `::' <time_stamp file> <command list>
                    590: .RE
                    591:
                    592: .fi
1.1       deraadt   593: The first format is used for defining variables.
                    594: The second format is used for distributing files to other hosts.
                    595: The third format is used for making lists of files that have been changed
                    596: since some given date.
1.2       dm        597: The \fIsource list\fP specifies a
1.1       deraadt   598: list of files and/or directories on the local host which are to be used
                    599: as the master copy for distribution.
1.2       dm        600: The \fIdestination list\fP is the list of hosts to which these files are to be
1.1       deraadt   601: copied.  Each file in the source list is added to a list of changes
                    602: if the file is out of date on the host which is being updated (second format) or
                    603: the file is newer than the time stamp file (third format).
1.2       dm        604: .PP
1.1       deraadt   605: Labels are optional. They are used to identify a command for partial updates.
1.2       dm        606: .PP
1.1       deraadt   607: Newlines, tabs, and blanks are only used as separators and are
                    608: otherwise ignored. Comments begin with `#' and end with a newline.
1.2       dm        609: .PP
1.1       deraadt   610: Variables to be expanded begin with `$' followed by one character or
                    611: a name enclosed in curly braces (see the examples at the end).
1.2       dm        612: .PP
1.1       deraadt   613: The source and destination lists have the following format:
1.2       dm        614: .nf
                    615:
                    616: .ti +.5i
1.1       deraadt   617: <name>
                    618: or
1.2       dm        619: .ti +.5i
1.10      aaron     620: `(' <zero or more names separated by whitespace> `)'
1.2       dm        621:
                    622: .fi
                    623: These simple lists can be modified by using one level of set addition,
                    624: subtraction, or intersection like this:
                    625: .nf
                    626:
                    627: .ti +.5i
                    628: list '-' list
                    629: or
                    630: .ti +.5i
                    631: list '+' list
                    632: or
                    633: .ti +.5i
                    634: list '&' list
                    635:
                    636: .fi
                    637: If additional modifications are needed (e.g., ``all servers and client
                    638: machines except for the OSF/1 machines'') then the list will have
                    639: to be explicitly constructed in steps using "temporary" variables.
                    640: .PP
1.1       deraadt   641: The shell meta-characters `[', `]', `{', `}', `*', and `?'
                    642: are recognized and expanded (on the local host only) in the same way as
1.2       dm        643: .IR csh (1).
1.1       deraadt   644: They can be escaped with a backslash.
                    645: The `~' character is also expanded in the same way as
1.2       dm        646: .IR csh
1.1       deraadt   647: but is expanded separately on the local and destination hosts.
                    648: When the
1.2       dm        649: .B \-o\fIwhole\fR
1.1       deraadt   650: option is used with a file name that begins with `~', everything except the
                    651: home directory is appended to the destination name.
                    652: File names which do not begin with `/' or `~' use the destination user's
                    653: home directory as the root directory for the rest of the file name.
1.2       dm        654: .PP
1.1       deraadt   655: The command list consists of zero or more commands of the following
                    656: format.
1.2       dm        657: .nf
                    658:
                    659: .RS
                    660: .ta \w'cmdspecial    'u +\w'name list    'u
                    661: `install'      <options>       opt_dest_name `;'
                    662: `notify'       <name list>     `;'
                    663: `except'       <name list>     `;'
                    664: `except_pat'   <pattern list>  `;'
                    665: `special'      <name list>     string `;'
                    666: `cmdspecial'   <name list>     string `;'
                    667: .RE
                    668:
                    669: .fi
                    670: .PP
1.1       deraadt   671: The
1.2       dm        672: .I install
1.1       deraadt   673: command is used to copy out of date files and/or directories.
                    674: Each source file is copied to each host in the destination list.
                    675: Directories are recursively copied in the same way.
1.2       dm        676: .I Opt_dest_name
1.1       deraadt   677: is an optional parameter to rename files.
                    678: If no
1.2       dm        679: .I install
1.1       deraadt   680: command appears in the command list or
                    681: the destination name is not specified,
                    682: the source file name is used.
                    683: Directories in the path name will be created if they
                    684: do not exist on the remote host.
1.2       dm        685: The
                    686: \fB\-o \fIdistopts\fR
                    687: option
                    688: as specified above under
                    689: .B OPTIONS,
                    690: has the same semantics as
                    691: on the command line except they only apply to the files
1.1       deraadt   692: in the source list.
                    693: The login name used on the destination host is the same as the local host
                    694: unless the destination name is of the format ``login@host".
1.2       dm        695: .PP
1.1       deraadt   696: The
1.2       dm        697: .I notify
1.1       deraadt   698: command is used to mail the list of files updated (and any errors
                    699: that may have occurred) to the listed names.
                    700: If no `@' appears in the name, the destination host is appended to
                    701: the name
                    702: (e.g., name1@host, name2@host, ...).
1.2       dm        703: .PP
1.1       deraadt   704: The
1.2       dm        705: .I except
1.1       deraadt   706: command is used to update all of the files in the source list
1.2       dm        707: .B except
                    708: for the files listed in \fIname list\fP.
1.1       deraadt   709: This is usually used to copy everything in a directory except certain files.
1.2       dm        710: .PP
1.1       deraadt   711: The
1.2       dm        712: .I except_pat
1.1       deraadt   713: command is like the
1.2       dm        714: .I except
                    715: command except that \fIpattern list\fP is a list of regular expressions
1.1       deraadt   716: (see
1.2       dm        717: .IR ed (1)
1.1       deraadt   718: for details).
                    719: If one of the patterns matches some string within a file name, that file will
                    720: be ignored.
                    721: Note that since `\e' is a quote character, it must be doubled to become
1.2       dm        722: part of the regular expression.  Variables are expanded in \fIpattern list\fP
1.1       deraadt   723: but not shell file pattern matching characters.  To include a `$', it
                    724: must be escaped with `\e'.
1.2       dm        725: .PP
1.1       deraadt   726: The
1.2       dm        727: .I special
1.1       deraadt   728: command is used to specify
1.2       dm        729: .IR sh (1)
1.1       deraadt   730: commands that are to be executed on the
1.2       dm        731: remote host after the file in \fIname list\fP is updated or installed.
                    732: If the \fIname list\fP is omitted then the shell commands will be executed
1.8       aaron     733: for every file updated or installed.
1.2       dm        734: .I String
1.1       deraadt   735: starts and ends with `"' and can cross multiple lines in
1.2       dm        736: .I distfile.
1.1       deraadt   737: Multiple commands to the shell should be separated by `;'.
                    738: Commands are executed in the user's home directory on the host
                    739: being updated.
                    740: The
1.2       dm        741: .I special
1.1       deraadt   742: command can be used to rebuild private databases, etc.
                    743: after a program has been updated.
1.8       aaron     744: The following environment variables are set for each
1.2       dm        745: .I special
                    746: command:
                    747: .IP \fBFILE\fR
                    748: The full pathname of the local file that was just updated.
                    749: .IP \fBREMFILE\fR
                    750: The full pathname of the remote file that was just updated.
                    751: .IP \fBBASEFILE\fR
                    752: The basename of the remote file that was just updated.
                    753: .PP
                    754: The
                    755: .I cmdspecial
                    756: command is similar to the
                    757: .I special
                    758: command, except it is executed only when the entire command is completed
                    759: instead of after each file is updated.
1.8       aaron     760: The list of files is placed in the environment variable
1.2       dm        761: .B $FILES.
                    762: Each file name in
                    763: .B $FILES
                    764: is separated by a `:' (colon).
                    765: .PP
                    766: If a hostname ends in a ``+'' (plus sign), then the plus
                    767: is stripped off and NFS checks are disabled.
                    768: This is equivalent to disabling the
                    769: .B \-o\fIchknfs\fR
                    770: option just for this one host.
                    771: .PP
                    772: The following is a small example.
                    773: .nf
                    774:
                    775: .RS
                    776: HOSTS = ( matisse root@arpa)
1.1       deraadt   777:
                    778: FILES = ( /bin /lib /usr/bin /usr/games
1.2       dm        779:        /usr/include/{*.h,{stand,sys,vax*,pascal,machine}/*.h}
                    780:        /usr/lib /usr/man/man? /usr/ucb /usr/local/rdist )
1.1       deraadt   781:
                    782: EXLIB = ( Mail.rc aliases aliases.dir aliases.pag crontab dshrc
1.2       dm        783:        sendmail.cf sendmail.fc sendmail.hf sendmail.st uucp vfont )
1.1       deraadt   784:
                    785: ${FILES} -> ${HOSTS}
1.2       dm        786:        install -oremove,chknfs ;
                    787:        except /usr/lib/${EXLIB} ;
                    788:        except /usr/games/lib ;
                    789:        special /usr/lib/sendmail "/usr/lib/sendmail -bz" ;
1.1       deraadt   790:
                    791: srcs:
                    792: /usr/src/bin -> arpa
1.2       dm        793:        except_pat ( \e\e.o\e$ /SCCS\e$ ) ;
1.1       deraadt   794:
                    795: IMAGEN = (ips dviimp catdvi)
                    796:
                    797: imagen:
                    798: /usr/local/${IMAGEN} -> arpa
1.2       dm        799:        install /usr/local/lib ;
                    800:        notify ralph ;
1.1       deraadt   801:
                    802: ${FILES} :: stamp.cory
1.2       dm        803:        notify root@cory ;
                    804: .RE
                    805:
                    806: .fi
                    807: .SH ENVIRONMENT
                    808: .IP TMPDIR
1.8       aaron     809: Name of temporary directory to use.  Default is
1.2       dm        810: .B /tmp.
1.5       millert   811: .IP RSH
                    812: Name of the default remote shell program to use.  Default is
1.13    ! millert   813: .B ssh.
1.2       dm        814: .SH FILES
                    815: .nf
                    816: .ta \w'/tmp/rdist*    'u
                    817: distfile       \- input command file
                    818: $TMPDIR/rdist* \- temporary file for update lists
                    819: .fi
                    820: .SH "SEE ALSO"
                    821: .B sh(1),
                    822: .B csh(1),
1.13    ! millert   823: .B rsh(1),
        !           824: .B ssh(1),
1.2       dm        825: .B stat(2),
1.13    ! millert   826: .B rcmdsh(3)
1.2       dm        827: .SH DIAGNOSTICS
                    828: .SH NOTES
                    829: .LP
                    830: If the basename of a file  (the last component in the pathname)
1.8       aaron     831: is ".", then
                    832: .B rdist
1.2       dm        833: assumes the remote (destination) name is a directory.
1.11      aaron     834: i.e.,
1.2       dm        835: .B /tmp/.
                    836: means that
                    837: .B /tmp
                    838: should be a directory on the remote host.
                    839: .LP
                    840: The following options are still recognized for backwards compatibility:
                    841: .sp
                    842: .RS
                    843: \-v \-N \-O \-q \-b \-r \-R \-s \-w \-y \-h \-i \-x
                    844: .RE
                    845: .sp
                    846: .SH BUGS
                    847: Source files must reside on the local host where rdist is executed.
                    848: .PP
1.1       deraadt   849: Variable expansion only works for name lists; there should be a general macro
                    850: facility.
1.2       dm        851: .PP
                    852: .I Rdist
1.1       deraadt   853: aborts on files which have a negative mtime (before Jan 1, 1970).
1.2       dm        854: .PP
                    855: If a hardlinked file is listed more than once in the same target,
1.8       aaron     856: then
                    857: .I rdist
1.2       dm        858: will report missing links.
                    859: Only one instance of a link should be listed in each target.