source: trunk/athena/bin/getcluster/getcluster.1 @ 12159

Revision 12159, 4.5 KB checked in by ghudson, 26 years ago (diff)
Autoconfiscate.
Line 
1.TH GETCLUSTER 8 "3 July 1997"
2.SH NAME
3getcluster \- retrieve service cluster info from Hesiod as environment vars
4.SH SYNOPSIS
5.B getcluster
6[
7.B \-b
8] [
9.B \-d
10] [
11.B -l local
12] [
13.B -f fallback
14] hostname version
15.PP
16.SH DESCRIPTION
17.I Getcluster
18queries the Hesiod database for service cluster information associated
19with the workstation on which it is run.  It writes a set of environment
20variable assignments on its standard output in a format acceptable
21to the C shell, or, if the
22.B \-b
23flag is present, in Bourne shell syntax.
24.I Getcluster
25returns an exit status of 2 if no cluster information is available, or
261 if any other error was encountered.
27.PP
28A cluster record contains between two and four fields: a
29variable name, a value, an optional version number, and an optional
30list of flags.  The version number is a dotted pair giving the major
31and minor numbers of the Athena release to which the variable
32definition applies.  Currently, the only defined flag is 't',
33indicating that the Athena release specified by the version is in
34testing.
35.PP
36If a fallback cluster information file is specified with the
37.B \-f
38flag, that file is read and the cluster records in it are considered
39lower priority than the Hesiod cluster records. For each variable
40name in the Hesiod cluster record, no record with the same variable
41name in the fallback file will be considered. Similarly, if a local
42cluster information file is specified with the
43.B \-l
44flag, that file is read and the cluster records in it are considered
45higher priority than the Hesiod cluster records and fallback cluster
46records.
47.PP
48.I Getcluster
49may discard a cluster record if it specifies a version which is
50higher than the current workstation version (as given by the
51.I version
52argument on the command line).  A record with a new version is
53rejected if any of the following are true:
54.TP 3
551.
56The environment variable
57.B AUTOUPDATE
58is not defined or has a value other than "true".
59.TP 3
602.
61The record specifies the 't' flag.
62.TP 3
633.
64The environment variable
65.B UPDATE_TIME
66is not defined or specifies a Unix time value greater than the current
67time.
68.PP
69After discarding records for the above reasons,
70.I getcluster
71outputs variable definitions for each of the variables mentioned in
72the remaining records.  For each variable,
73.I getcluster
74selects the value given in the record with the highest version number,
75or uses a record with no version number if no records with version
76numbers are present.
77.PP
78.I Getcluster
79may also output three special variable definitions:
80.IP NEW_TESTING_RELEASE
81If any records were discarded because they contained the 't' flag and
82specified versions greater than the current workstation version,
83.B NEW_TESTING_RELEASE
84is set to the highest version number given in those records.
85.IP NEW_PRODUCTION_RELEASE
86If any records were discarded because they specified versions greater
87than the current workstation version and the
88.B AUTOUPDATE
89environment variable was not "true,"
90.B NEW_PRODUCTION_RELEASE
91is set to the highest version number given in those records.
92.IP UPDATE_TIME
93If any records specified higher version numbers than the current
94workstation version and were not discarded for the first two reasons,
95.B UPDATE_TIME
96is set to a time at which the workstation should accept the new
97values.  The value is taken from the current value in the environment
98if it is present; otherwise a random Unix time value between the
99current time and four hours in the future is chosen.  The random
100number generator is seeded with the IP address given in the
101.B ADDR
102environment variable, or with a fixed value if none is specified.
103.PP
104If the
105.B \-d
106flag is present,
107.I getcluster
108will ignore the hostname argument and instead read lines from standard
109input, treating each line as if it were an entry in the Hesiod
110database for the host's cluster information.
111.PP
112.I Getcluster
113is usually invoked from
114.I save_cluster_info (8),
115which places its output in the files
116.I /var/athena/clusterinfo
117and
118.I /var/athena/clusterinfo.bsh
119to be accessed by the C shell in a user's .login file and the Bourne
120shell in a user's .profile, respectively.  It may also be invoked
121directly by any user.
122.PP
123Getcluster uses the Hesiod type "cluster".
124.SH EXAMPLES
125# C shell example
126.br
127getcluster `hostname` 5.3 > file; source file
128.PP
129# Bourne shell example
130.br
131getcluster -b `hostname` 5.3 > file; . file
132.SH "SEE ALSO"
133`Hesiod - Project Athena Technical Plan -- Name Service', save_cluster_info(8)
134.SH AUTHOR
135Steve Dyer, IBM/Project Athena
136.br
137Greg Hudson, MIT Information Systems
138.br
139Copyright 1987, 1997, Massachusetts Institute of Technology
140.br
141.SH BUGS
Note: See TracBrowser for help on using the repository browser.