source: trunk/athena/etc/track/subscriptionlist.5 @ 14093

Revision 14093, 7.3 KB checked in by danw, 25 years ago (diff)
autoconfiscate
Line 
1.ll 6.5i
2.TH SUBSCRIPTIONLIST 5 "19 September 1988"
3.UC 4
4.SH NAME
5subscriptionlist \- describe files to be updated by track
6.SH DESCRIPTION
7.PP
8A
9.B subscriptionlist
10defines a set of files to be considered for updating by the
11.B track
12system.
13A
14.B subscriptionlist
15contains a set of
16.I entries.
17Typically, each
18.I entry
19represents a directory, but an
20.I entry
21may represent a file, link, or device.
22.P
23The librarian uses the command
24.sp 1
25.ti +4
26track -w [ options...]
27.I subscriptionlist
28.sp 1
29to prepare a
30.I statfile,
31which comprises an efficient representation of the
32library filesystem's currentness.
33.P
34The subscriber uses
35.B track
36& a subscriptionlist, together with the librarian's statfile,
37to update his own files from the library's copies.
38Note that the librarian & subscriber may use different subscriptionlists.
39.SH SYNTAX
40A subscriptionlist is a list of
41.I entries.
42.P
43A
44.I global exception-list
45may appear before the first
46.I entry.
47This takes the form:
48.sp 1
49.br
50GLOBAL :
51.I pattern ...
52:
53.sp 1
54.br
55where each
56.I pattern
57is a shell-wildcard, using '*', '?', and '[]'.
58Braces '{}' are not interpreted in subscriptionlist patterns.
59.PP
60Each
61.I entry
62has 5 fields, separated by colons:
63.sp 1
64.I fromfile
65:
66.I tofile
67:
68.I cmpfile
69:
70.I except-list
71: [ command...]
72.sp 1
73The fields are (in order) :
74.RS
75.ti -2
761)
77.I fromfile:
78name of the source file on the librarian machine.
79This field must not be blank.
80.ti -2
812)
82.I tofile:
83name of the destination file on the subscriber machine.
84Default is
85.I fromfile.
86.ti -2
873)
88.I cmpfile:
89name of the comparison file on the subscriber machine,
90to be used for determining if an update is necessary.
91Default is
92.I tofile.
93.ti -2
944)
95.I exception-list:
96a list of special cases and files to be excluded from updating.
97.ti -2
985) A shell
99.I command-line
100to be executed whenever an update is made.
101(NOTE: this feature is currently disabled, because it needs to be rewritten.)
102.RE
103.P
104Fields are separated by a colon.
105The last field (and thus the entry) is terminated with a newline.
106.sp 1
107Each of the fields
108.I fromfile, tofile, cmpfile,
109is stripped of leading slashes '/',
110and leading/trailing white space is ignored in these fields.
111.sp 1
112In the
113.I exception-list,
114whitespace is used to separate entries.
115.sp 1
116In the
117.I command-line,
118all white space is preserved and passed to /bin/sh, and
119newlines can be escaped with a backslash.
120The backslash will be removed before the script is sent to the shell.
121.sp 1
122Any characters after a hashmark, "#", up to the end of line
123will be treated as comments and ignored.
124.SH SEMANTICS
125.P
126In the following, we assume that
127.B track
128has been invoked with the command-line options "-F/from_mnt -T/to_mnt",
129and that the librarian file-system has been
130mounted on the mount-point /from_mnt.
131For each entry "A ::: a b c :",
132.B track
133compares the trees /from_mnt/A & /to_mnt/A,
134and then updates /to_mnt/A and its subordinates if necessary,
135excepting the subtrees a, b, & c.
136Note that the librarian's exception-list for A is also in effect, because
137.B track
138's knowledge of /from_mnt's file-system state comes from the librarian's
139.I statfile
140(q.v.).
141.P
142.B Track
143does not require the pathnames indicated by
144.I fromfile, tofile, & cmpfile
145to have the same file-type.
146If, however, non-default directories
147.I tofile
148or
149.I cmpfile
150appear in the entry, track will expect these trees to parallel
151.I fromfile's
152structure quite perfectly.
153If an entry specifies
154.I cmpfile
155explicitly, cmpfile will be path-qualified with either /from_mnt or /to_mnt,
156according to whether or not the -w option is used.
157.P
158If the name of a directory is used in any field,
159.B track
160treats the directory as being the root of a subtree.
161If the name of a symbolic link is used in any field,
162.B track
163will handle the symbolic link itself and will NOT follow the link.
164.PP
165If, in an
166.I exception-list,
167an item A is preceded by an arrow "->",
168.B track
169will export/import a symbolic-link
170to the librarian's copy of the named item.
171Wild-card patterns may appear in the exception-lists.
172.RE
173.P
174Because this is a data-description-language, and not a procedural language,
175the order of the
176.I entries'
177appearance in the subscriptionlist is not important.
178.B Track
179traverses the subscriptionlist more-or-less alphabetically,
180but it is unwise to assume that
181.B track
182will update one entry before another.
183If one
184.I entry
185is a subdirectory of another,
186.B track
187ensures that the parent directory
188is updated first, but that the child-entry's exception-list will be applied
189to the the child-directory's contents.
190.SH EXAMPLES
191.in 8
192
193.ti -8
194etc/hosts : : : :
195.br
196This entry specifies the file named "/mnt/etc/hosts".
197.sp  1
198.ti -8
199/etc/hosts : : : :
200.ti -8
201/etc/services : : : :
202.br
203These entries specify the files "/mnt/etc/hosts" and "/mnt/etc/services".
204.sp  1
205.ti -8
206usr/lib : : : :
207.br
208This entry specifies the entire subtree rooted at /mnt/usr/lib
209.sp 1
210.ti -8
211/usr/lib : : : sendmail.cf uucp :
212.br
213This entry specifies files in the subtree rooted
214at "/mnt/usr/lib" except for "/mnt/usr/lib/sendmail.cf" and all files
215in the subtree rooted at "/mnt/usr/lib/uucp".
216.ti -8
217/usr/lib/aliases : : : : newaliases
218.br
219This entry specifies the file "/mnt/usr/lib/aliases" and
220will execute the command "newaliases" if and only if
221a new version is successfully copied.
222.sp 1
223.ti -8
224/usr/lib/aliases : : : : newaliases \e
225.ti -4
226echo aliases file has been updated \(bv mail root
227.br
228This entry works exactly like the previous example and
229in addition sends mail to the administrator.
230.sp 1
231.ti -8
232/usr/lib/aliases : : : : newaliases \e
233.ti -4
234echo `date` /usr/lib/aliases >> /usr/adm/tracklog
235.br
236This entry works exactly like the previous example except that rather than
237sending mail, a log entry containing the date and filename is appended to the
238file named "/usr/adm/tracklog".
239.sp 1
240.ti -8
241/usr/lib/aliases : /tmp/aliases : : : \e
242.ti -4
243echo new aliases file has arrived \(bv mail root
244.br
245This entry copies any new versions of the file named "/usr/lib/aliases" on the
246.I librarian
247to a locally named file "/tmp/aliases" and sends mail to the administrator.
248.sp 1
249.ti -8
250/etc/zoneinfo::: ->* Australia GMT*:
251.ti -8
252/etc/zoneinfo/EST::::
253.ti -8
254/etc/zoneinfo/EST5EDT::::
255.ti -8
256/etc/zoneinfo/localtime::::
257.br
258These entries cause a "link-farm" to be maintained under /etc/zoneinfo,
259except that EST, EST5EDT, and localtime will be updated normally,
260and Australia, GMT, GMT+1, GMT+2, etc., will be ignored.
261.sp 1
262.ti -8
263/bin/sh : /bin/nsh : : : \e
264.ti -4
265mv /bin/sh /bin/osh \e
266.ti -4
267mv /bin/nsh /bin/sh \e
268.ti -4
269echo new shell installed \(bv  mail root
270.br
271This entry copies any new versions of the file named "/bin/sh" on the
272.I librarian
273to a locally named file "/bin/nsh", then saves "/bin/sh" in "/bin/osh",
274then moves the the new version into "/bin/sh".
275.sp 1
276.ti -8
277/usr/sys/GORP/vmunix : /nvmunix : /vmunix : : \e
278.ti -4
279mv /vmunix /ovmunix \e
280.ti -4
281mv /nvmunix /vmunix \e
282.ti -4
283shutdown -r now
284.br
285This entry causes
286.B track
287to compare the locally named file "/vmunix" with the
288.I librarian's
289file named
290"/usr/sys/GORP/vmunix".
291If the versions differ, the new version will be copied into
292the locally named file "/nvmunix" and the shell script will
293be executed to install and reboot with the new kernel.
294.in -8
295.SH FILES
296 .../track/slists/
297.I subscriptionlist_name
298.SH BUGS
299.SH "SEE ALSO"
300track(1)
301.br
302statfile(5)
303.br
304When Network File Systems Aren't Enough: Automatic File Distribution Revisited
305.br
306.ti 5
307by Daniel Nachbar
Note: See TracBrowser for help on using the repository browser.