Provided by:
debathena-getcluster_10.0.0-0debathena2~ubuntu9.10_i386
NAME
getcluster - retrieve service cluster info from Hesiod as environment
vars
SYNOPSIS
getcluster [ -b ] [ -d ] [ -h hostname ] version
DESCRIPTION
getcluster queries the Hesiod database for service cluster information
associated with the workstation on which it is run. It writes a set of
environment variable assignments on its standard output in a format
acceptable to the C shell, or, if the -b flag is present, in Bourne
shell syntax. getcluster returns an exit status of 2 if no cluster
information is available, or 1 if any other error was encountered.
A cluster record contains between two and four fields: a variable name,
a value, an optional version number, and an optional list of flags.
The version number is a dotted pair giving the major and minor numbers
of the Athena release to which the variable definition applies.
Currently, the only defined flag is 't', indicating that the Athena
release specified by the version is in testing.
By default, getcluster looks up cluster information for the current
hostname. This name may be overridden by the contents of the file
/etc/athena/cluster or via the command line using the -h option. A
cluster name such as public-linux may be given in place of a hostname.
If /etc/athena/cluster.fallback is present, that file is read and the
cluster records in it are considered lower priority than the Hesiod
cluster records. For each variable name in the Hesiod cluster record,
no record with the same variable name in the fallback file will be
considered. If /etc/athena/cluster.local is present, that file is read
and the cluster records in it are considered higher priority than the
Hesiod cluster records and fallback cluster records.
getcluster may discard a cluster record if it specifies a version which
is higher than the current workstation version (as given by the version
argument on the command line). A record with a new version is rejected
if any of the following are true:
1. The environment variable AUTOUPDATE is not defined or has a value
other than "true".
2. The record specifies the 't' flag.
3. The environment variable UPDATE_TIME is not defined or specifies a
Unix time value greater than the current time.
After discarding records for the above reasons, getcluster outputs
variable definitions for each of the variables mentioned in the
remaining records. For each variable, getcluster selects the value
given in the record with the highest version number, or uses a record
with no version number if no records with version numbers are present.
getcluster may also output three special variable definitions:
NEW_TESTING_RELEASE
If any records were discarded because they contained the 't'
flag and specified versions greater than the current workstation
version, NEW_TESTING_RELEASE is set to the highest version
number given in those records.
NEW_PRODUCTION_RELEASE
If any records were discarded because they specified versions
greater than the current workstation version and the AUTOUPDATE
environment variable was not "true," NEW_PRODUCTION_RELEASE is
set to the highest version number given in those records.
UPDATE_TIME
If any records specified higher version numbers than the current
workstation version and were not discarded for the first two
reasons, UPDATE_TIME is set to a time at which the workstation
should accept the new values. The value is taken from the
current value in the environment if it is present; otherwise a
random Unix time value between the current time and four hours
in the future is chosen. The random number generator is seeded
with the IP address given in the ADDR environment variable, or
with a fixed value if none is specified.
If the -d flag is present, getcluster will ignore the hostname argument
and instead read lines from standard input, treating each line as if it
were an entry in the Hesiod database for the host's cluster
information.
getcluster is usually invoked from save_cluster_info (8), which places
its output in the files /var/athena/clusterinfo and
/var/athena/clusterinfo.bsh to be accessed by the C shell in a user's
.login file and the Bourne shell in a user's .profile, respectively.
It may also be invoked directly by any user.
getcluster uses the Hesiod type cluster.
DEPRECATED SYNTAX
For compatibility with older versions of getcluster, a command-line
argument may be given before the version number. (This is how the
hostname used to be specified; now it is ignored.) The name of the
fallback and local cluster files may be controlled using the -f and -l
options, but there is no good reason to do so.
EXAMPLES
# C shell example
getcluster 5.3 > file; source file
# Bourne shell example
getcluster -b 5.3 > file; . file
SEE ALSO
`Hesiod - Project Athena Technical Plan -- Name Service',
save_cluster_info(8)
AUTHOR
Steve Dyer, IBM/Project Athena
Greg Hudson, MIT Information Systems
Copyright 1987, 1997, Massachusetts Institute of Technology
BUGS
3 July 1997 GETCLUSTER(1)