ADMIN(1)

NAME
admin - administer SCCS files

SYNOPSIS
admin [-n] [-i[name] [-rrel] [-t[name]] [-fadd-flag[flag-val] ...~ [-ddelete-flag] ...~ [-aadd-login] ...~ [-eerase-login] ...~ [-h] [-z] name ...

DESCRIPTION
Admin is used to create new SCCS files and change parameters of existing ones. Arguments to admin , which may appear in any order, consist of keyletter arguments, which begin with ``-'', and named files. If a named file doesn't exist, it is created, and its parameters are initialized according to the specified keyletter arguments. Parameters not initialized by a keyletter argument are assigned a default value. If a named file does exist, parameters corresponding to specified keyletter arguments are changed, and other parameters are left as is.

If a directory is named, admin behaves as though each file in the directory were specified as a named file, except that non-SCCS files (last component of the pathname does not begin with ``s.''), and unreadable files, are silently ignored. If a name of ``-'' is given, the standard input is read; each line of the standard input is taken to be the name of an SCCS file to be processed. Again, non-SCCS files and unreadable files are silently ignored.

The keyletter arguments are as follows. Each is explained as though only one named file is to be processed, but the effects of any keyletter argument other than i and r apply independently to each named file.

    -n  This argument indicates that new files are to be created. This argument must be specified when creating new SCCS files. The i argument implies an n argument.

    -i  The name of a file from which the text of an initial delta is to be taken. If this argument is supplied, but the file name is omitted, the text is obtained by reading the standard input until an end-of-file is encountered. If this argument is omitted, and the admin command creates one or more SCCS files, then their initial deltas must be inserted in the normal manner, using get and delta (1). Only one SCCS file may be created by an admin command on which the i argument is supplied.

    -r  The release into which the initial delta will be inserted. This argument may only be supplied if the i argument is also supplied. If this argument is omitted, the initial delta will be inserted into release 1. The level of the initial delta will always be 1.

    -t  The name of a file from which descriptive text for the SCCS file is to be taken. If this argument is supplied and admin is creating a new SCCS file, the descriptive-text file-name must also be supplied. In the case of existing SCCS files, if this argument is supplied but the file name is omitted, the descriptive text (if any) currently in the SCCS file will be removed. If the file name is supplied, the text in the file named will replace the descriptive text (if any) currently in the SCCS file.

    -f  This argument specifies a flag, and, possibly, a value for the flag, to be added to the SCCS file. Several f arguments may be supplied on a single admin command. The allowable flags and their values are as follows:

        b   The presence of this flag indicates that the use of the b argument on a get command will cause a branch to be taken in the delta tree.

        cceil
            The ``ceiling:'' the highest release (less than or equal to 9999) which may be specified by the r argument on a get with an e argument. If this flag is not specified, the ceiling is 9999.

        dSID
            The default SID to be used on a get when the r argument is not supplied.

        ffloor
            The ``floor:'' the lowest release (greater than 0) which may be specified by the r argument on a get with an e argument. If this flag is not specified, the floor is 1.

        i   The presence of this flag causes the "No id keywords (ge6)" message issued by get or delta to be treated as a fatal error. In the absence of this flag, the message is only a warning.

        mmod
            This flag specifies the module name of the SCCS file. Its value will be used by get as the replacement for the %M% keyword.

        ttype
            This flag specifies the type of the module. Its value will be used by get as a replacement for the %Y% keyword.

        v[pgm]
            The presence of this flag indicates that delta is to prompt for MR numbers in addition to comments. If the optional value of this flag is present, it specifies the name of an MR number validity checking program.

    -d  This argument specifies a flag to be completely removed from an SCCS file. This argument may only be specified when processing existing SCCS files. Several d arguments may be supplied on a single admin command. See the f argument for the allowable flags.

    -a  A login name to be added to the list of logins which may add deltas. Several a arguments may be supplied on a single admin command. As many logins as desired may be on the list simultaneously. If the list of logins is empty, then anyone may add deltas.

    -e  A login name to be erased from the list of logins. Several e arguments may be supplied on a single admin command.

    -h  This argument provides a convenient mechanism for checking for corrupted files. With this argument, admin will check that the sum of all the characters in the SCCS file (the check-sum) agrees with the sum which is stored in the first line of the file. If the sums are not in agreement a "corrupted file" message will be produced. This argument inhibits writing on the file, so that it will nullify the effect of any other arguments supplied, and is, therefore, only meaningful when processing existing files.

    -z  This argument will cause admin to ignore any discrepancy in the check-sum of the SCCS file (see h argument), and to replace it with the new one. (The same effect may be had by first editing the SCCS file with ed (1) in order to replace the five-character check-sum in the first line of the file with five zeroes. A subsequent invocation of an SCCS command which modifies the file (e.g., admin , delta ), will cause check-sum validation to be by-passed, and a new check-sum to be computed.) The purpose of this is to correct the check-sum in those files which may have been edited by the user. Note that use of this argument on a truly corrupted file will prevent future detection of the corruption.

FILES
The last component of all SCCS file names must be of the form ``s.modulename''. New SCCS files are given mode 444. Write permission in the pertinent directory is, of course, required to create a file. All writing done by admin is to a temporary x-file (see get (1)), created with mode 444 if the admin command is creating a new SCCS file, or with the same mode as the SCCS file if it exists. After successful execution of admin , the SCCS file will be deleted, if it exists, and the x-file will be renamed with the name of the SCCS file. This ensures that changes will be made to the SCCS file only if no errors occurred.

It is recommended that directories containing SCCS files be mode 755 and that SCCS files themselves be mode 444. The mode of the directories will allow only the owner to modify SCCS files contained in the directories. The mode of the SCCS files will prevent any modification at all except by SCCS commands.

If it should be necessary to patch an SCCS file for any reason, the mode may be changed to 644 by the owner, and then the owner may edit the file at will with ed (1).

Admin also makes use of the z-file, which is used to prevent simultaneous updates to the SCCS file by different users. See get (1) for further information.

SEE ALSO
get(1), delta(1), prt(1), what(1), help(1), ed(1), sccsfile(5)
SCCS/PWB User's Manual by L. E. Bonanni and A. L. Glasser.

DIAGNOSTICS
Use help (1) for explanations.