Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(1V)

delta(1)

ed(1)

get(1)

help(1)

prs(1)

sccs(1)

what(1)

sccsfile(5)

ADMIN(1)  —  USER COMMANDS

NAME

admin − create and administer SCCS files

SYNOPSIS

/usr/sccs/admin [ −bhnz ] [ −alogin ] ... [ −dflag [ flag-val ]] ... [ −elogin ] ... [ −fflag [ flag-val ]] ...

[ −i [ name ]] [ −llist ] [ −m [ mrlist ]] [ −rrelease ] [ −t [ name ]] [ −y [ comment ]] filename ...

DESCRIPTION

admin creates new SCCS files and changes parameters of existing ones.  Filenames of SCCS files begin with the ‘s.’ prefix.  A named file is created if it does not exist already, and its parameters are initialized according to the specified options.  Any parameter not initialized by an option is assigned a default value.  If a named file does exist, parameters are altered according to the specified options, 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 (for which the last component of the path name does not begin with ‘s.’) and unreadable files are silently ignored.  A filename of ‘−’ means the standard input — each line of the standard input is taken as the name of an SCCS file to be processed.  Again, non-SCCS files and unreadable files are silently ignored. 

OPTIONS

Options are explained as though only one named file is to be processed, since they apply to each file independently. 

−b When used with the −i flag, this option indicates that the SCCS file is to contain an encoded version of a binary data file.  Normally, admin treats a file as binary only if it contains NUL or control characters, or does not end with a NEWLINE. However binary files do not fit these criteria; −b forces the initial delta to be flagged as binary, otherwise subsequent deltas that do fit the criteria cannot be checked in. 

−h Check the structure of the SCCS file (see sccsfile(5)), and compare a newly computed check-sum with one stored in the first line of the SCCS file. 

The −h option inhibits writing on the file, so that it nullifies the effect of any other options; it is therefore only meaningful when processing existing files. 

−n Create a new SCCS file. 

−z Recompute the file check-sum and store it in the first line of the SCCS file.  Note: using the −z option on a truly corrupted file may prevent its corrupted state from being detected later on. 

−alogin
Add a login name, or a numerical group-ID, to the list of users who can make deltas to the SCCS file.  A group-ID is equivalent to specifying all users in the group.  Several −a options can appear on a single admin command line.  As many login-, or group-ID, as desired can be on the list simultaneously.  If the list of users is empty, anyone may add deltas. 

−dflag
Delete the indicated flag from an SCCS file.  The −d option may be specified only for existing SCCS files, and several −d options can be supplied on a single admin command. 

−elogin
Erase a login name or numerical group-ID from the list of users allowed to make deltas.  Several −e options may be used on a single admin command line. 

−fflag
Set the indicated flag, and, possibly, a value for that flag. Several −f options can be supplied on a single admin command line.  flags and their values appear in the FLAGS section below. 

−i[name]
Initial text: the file name contains the text for the new SCCS file.  This text constitutes the initial delta (set of checked changes checked in at one time); see the −r option for the delta numbering scheme.  If name is omitted, the text is obtained from the standard input.  Omitting the −i option altogether creates an empty SCCS file.  You can only create one SCCS file with an ‘admin −i’ command.  Creating more than one SCCS file with a single admin command requires that they be created empty, in which case the −i option should be omitted.  Note: the −i option implies the −n option. 

−llist Unlock the specified list of releases.  See FLAGS below for a description of the l flag and the syntax of a list.

−m[mrlist]
The list of Modification Request (MR) numbers is inserted into the SCCS file as the rationale for creating an initial delta.  A diagnostics message results if the v flag is not set or the MR validation fails. 

−rrelease
Specify the release for the initial delta. −r may be used only if the −i option is also used.  The initial delta is inserted into release 1 if this option is omitted.  The level of the initial delta is always 1, and initial deltas are named 1.1 by default. 

−t[name]
Insert descriptive text contained in the file name. The descriptive text file name must be supplied when creating a new SCCS file (either or both −n and −i options) and the −t option is used.  In the case of existing SCCS files: 1) a −t option without a file name removes descriptive text (if any) currently in the SCCS file, and 2) a −t option with a file name replaces the descriptive text currently in the SCCS file with any text in the named file. 

−y[comment]
Insert a comment for the initial delta into the SCCS file.  If the −y option is omitted, a default comment line is inserted in the form:

date and time created YY/MM/DD s HH:MM:SS by login

The −y option is valid only if the −i and/or −n options are specified. 

FLAGS

The following flags can appear as arguments to the −f (set flags) and −d (delete flags) options:

b When set, the −b option can be used on a get(1) command to create branch deltas. 

cceil The highest release (ceiling) which may be retrieved by a get(1) command for editing.  The ceiling is a number less than or equal to 9999.  The default value for an unspecified c flag is 9999. 

ffloor The lowest release (floor) which may be retrieved by a get(1) command for editing.  The floor is a number greater than 0 but less than 9999.  The default value for an unspecified f flag is 1. 

dSID The default delta number (SID) to be used by a get(1) command. 

i Treats the ‘No id keywords (ge6)’ message issued by get(1) or delta(1) as a fatal error.  In the absence of the i flag, the message is only a warning.  The message is displayed if no SCCS identification keywords (see get(1)) are found in the text retrieved or stored in the SCCS file. 

j Concurrent get(1) commands for editing may apply to the same SID of an SCCS file.  This allows multiple concurrent updates to the same version of the SCCS file. 

llist A list of locked releases to which deltas can no longer be made.  A ‘get −e’ fails when applied against one of these locked releases.  The list has the following syntax:

<list> ::= <range> | <list> , <range>
<range> ::=Release Number | a

The character a in the list is equivalent to specifying all releases for the named SCCS file. 

n The delta(1) command creates a “null” delta in each release (if any) being skipped when a delta is made in a new release.  For example, releases 3 and 4 are skipped when making delta 5.1 after delta 2.7.  These null deltas serve as “anchor points” so that branch deltas may be created from them later.  If the n flag is absent from the SCCS file, skipped releases will be non-existent in the SCCS file, preventing branch deltas from being created from them in the future. 

qtext text is defined by the user.  The text is substituted for all occurrences of the %Q% keyword in SCCS file text retrieved by get(1). 

mmodule
module name of the SCCS file substituted for all occurrences of the %M% keyword in the SCCS file text retrieved by get(1).  If the m flag is not specified, the value assigned is the name of the SCCS file with the leading s.  removed. 

ttype type of module in the SCCS file substituted for all occurrences of %Y% keyword in SCCS file text retrieved by get(1). 

v[program]
Validity checking program: delta(1) prompts for Modification Request (MR) numbers as the reason for creating a delta.  The optional program specifies the name of an MR number validity checking program (see delta(1)).  If this flag is set when creating an SCCS file, the −m option must also be used even if its value is NULL. 

FILES

The last component of all SCCS file names must be of the form s.filename.  New SCCS files are given mode 444 (see chmod(1V)).  All writing done by admin is to a temporary file with an ‘x’.  prefix, created with mode 444 for a new SCCS file, or with the same mode as an existing SCCS file.  After successful execution of admin, the existing SCCS file is removed, then replaced with the x.filename.  This ensures that changes are made to the SCCS file only when no errors have occurred. 

It is recommended that directories containing SCCS files have permission mode 755, and that the SCCS files themselves have mode 444.  The  mode for directories allows only the owner to modify the SCCS files contained in the directories, while the mode of the SCCS files themselves prevents all modifications except those performed using 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 to allow use of a text editor.  However, extreme care must be taken when doing this.  The edited file should always be processed by an ‘admin −h’ to check for corruption, followed by an ‘admin −z’ to generate a proper check-sum.  Another ‘admin −h’ is recommended to ensure that the resulting SCCS file is valid. 

admin also uses a transient lock file (called z.filename), to prevent simultaneous updates to the SCCS file by different users.  See get(1) for further information. 

SEE ALSO

chmod(1V), delta(1), ed(1), get(1), help(1), prs(1), sccs(1), what(1), sccsfile(5)

Programming Utilities and Libraries. 

DIAGNOSTICS

Use help(1) for explanations. 

Sun Release 4.0  —  Last change: 5 January 1988

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026