After you have created and compiled prototype files and modified client machines, you are ready to run the package program. It is probably most convenient to run the package program automatically at reboot by invoking it in the machine's AFS initialization file, but you can also issue the command at the command shell prompt.
The configuration file must be completely correct. If there are any syntax errors or incorrect values, the program exits without executing any instruction. To check the configuration file, issue the package command with the -noaction and -debug flags at the command shell prompt. They display a list of potential problems without actually executing instructions.
The package program follows these general rules. Complete explanations are in Package Configuration File Instruction Syntax.
The package program does not delete any files from the disk unless the R update code was specified in the prototype file. If the R update code is associated with the parent directory, the package program removes anything from the local disk directory that is not specified in the configuration file.
Local files are updated only if they are out of date. For each F instruction in the configuration file, the package program compares the time of the local file with the indicated source file. If the source file is newer than the local, the file is updated.
When the initialization file is modified as recommended in Modifying Client Machines, the package program reboots the workstation automatically if any files marked with the Q update code are updated, and if the package program has been invoked from the initialization file. When a file marked with the Q update code is changed, the package program exits with status code 4, causing a reboot (as directed in the initialization file). Files that require a reboot before changes are recognized (such as the operating system kernel and /usr/vice/etc/CellServDB files) must be marked with a Q update code in the configuration file.
The package program copies the configuration file it has just used to /etc/package.sysname, where sysname reflects this machine's system type. The package command interpreter consults this file if you do not provide a configuration file name. To be sure that it configures the local disk as you wish, review its contents.
Become the local superuser root on the machine, if you are not already, by issuing the su command.
% su root
Password: <root_password
>
(Recommended) Verify the following:
The /.package file identifies the desired configuration file
The package binary is available as /etc/package
The initialization file is properly modified to invoke the package program automatically
Reboot the machine, using the appropriate command.
# shutdown
Become the local superuser root on the machine, if you are not already, by issuing the su command.
% su root
Password: <root_password
>
Verify the following:
The /.package file identifies the desired configuration file
The package binary is available as /etc/package
The initialization file is properly modified to invoke the package program automatically
Issue the package command.
# package [initcmd] [-config <base name of configuration file
>] \ [-fullconfig <full name of configuration file, or stdin for standard input
>] \ [-overwrite] [-noaction] [-verbose] [-silent] [-rebootfiles]
where
Specifies the full pathname of the configuration file to use, ending in the file's base name, which omits the suffix that indicates the machine type. The package program knows how to determine a machine's type, and automatically selects the appropriate version of the base file name. An example of the proper value for this argument is staff rather than staff.rs_aix42. You can also have the package program refer to /.package to learn the configuration file name by providing the following value:
`cat /.package`
Use either this argument or the -fullconfig argument.
Specifies the full name of the configuration file to use, complete with the machine-type extension. Examples are staff.rs_aix42 and minimal.hp_ux110 files.
Another possibility is the string stdin, which indicates that the issuer is providing configuration information via the standard input stream, either as a piped file or by typing the configuration file at the keyboard. Press <Ctrl-d> to conclude the input.
Use either this argument or the -config argument.
Overwrite elements on the local disk with the source version indicated in the configuration file, even if the first (owner) w (write) mode bit is turned off on the local disk copy of the file. Files protected by the I update code are not overwritten; see the definition for the F instruction.
Displays on the standard output stream a trace of potential problems in running the command, rather than actually running it. If the -verbose flag is added, the trace also notes the actions the package program attempts.
Explicitly invokes the default level of tracing, which includes only a list of problems encountered while executing the command.
Produces a detailed trace of the program's actions on the standard output stream. The trace records on the transfer and ownership/mode bit setting of each element in the configuration file.
Prevents the overwrite of any element marked with the Q update-mode code in the configuration file. This effectively prevents the machine from rebooting automatically again when the package program is invoked from an initialization file.
If you think files marked with the Q update code were updated, reboot the machine. This reboot does not occur automatically.