Running the package program

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.

To invoke the package program by rebooting

  1. Become the local superuser root on the machine, if you are not already, by issuing the su command.

       % su root
       Password: <root_password>
    
  2. (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

  3. Reboot the machine, using the appropriate command.

       # shutdown
    

To invoke the package program directly (without rebooting)

  1. Become the local superuser root on the machine, if you are not already, by issuing the su command.

       % su root
       Password: <root_password>
    
  2. 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

  3. 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

    -config

    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.

    -fullconfig

    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

    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.

    -noaction

    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.

    -silent

    Explicitly invokes the default level of tracing, which includes only a list of problems encountered while executing the command.

    -verbose

    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.

    -rebootfiles

    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.

  4. If you think files marked with the Q update code were updated, reboot the machine. This reboot does not occur automatically.