Modifying Client Machines

To prepare a client to run the package program automatically, perform the following steps. The instructions are generic because they do not refer to system-specific configuration files. If desired, you can invoke the package program with specific arguments, as described in the OpenAFS Administration Reference.

  1. Specify the configuration file to use.

    The .package file in the client machine's root ( /) directory is redirected as an argument to the package command; the .package file specifies which configuration file the package program uses.

  2. Make the package binary available to the client, either by copying it to the local disk, or by creating a symbolic link to AFS.

    • A symbolic link saves local disk space. However, when the file server machine that houses it is down, the package binary is inaccessible.

    • Keeping the package binary on the local disk enables you to run the package program even if file server is down. However, a file server machine outage usually makes it difficult to run the package program because most configuration file instructions refer to files in AFS. A local copy of the package binary can be useful if the files referred to in instructions are in replicated volumes.

  3. Modify the client machine's initialization file to invoke the package program at reboot. The client machine reboots a second time if the package program updates any files marked with the Q update code.

To prepare a client machine to run the package program

Repeat these instructions on every client that runs the package program.

These instructions assume that the package configuration files (created when the prototype files were compiled) reside in the /afs/cellname/wsadmin/etc directory.

  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. Create the .package file in the root ( /) directory and specify the name of the prototype file to use. Do not include the system-type suffix (such as .rs_aix42); the package program automatically determines the correct machine type.

       # echo "/afs/cellname/wsadmin/etc/config_file" >> /.package
    

    For example, to configure a machine for a member of staff machine (assuming the proper prototype file had been defined and compiled for the system type), the appropriate command is:

       # echo "/afs/cellname/wsadmin/etc/staff" >> /.package
    
  3. Make the package binary available on the local disk as /etc/package. Issue one of the following commands, depending on whether you want to create a file or create a symbolic link.

    To store the package binary locally, enter the following command:

       # cp /afs/cellname/sysname/usr/afsws/etc/package   /etc/package
    

    To create a symbolic link, enter the following command:

       # ln -s /afs/cellname/sysname/usr/afsws/etc/package   /etc/package
    
  4. Add the following lines to the appropriate initialization file, after the afsd command is invoked. If this is a file server machine, the bosserver command must follow the package command.

    Using the -v and -c options is recommended. The -v flag produces a detailed trace, and the -c option appends the system type to the base name of the configuration file. See the OpenAFS Administration Reference for a description of other options.

    [Note]Note

    Replace the shutdown command with a similar command if it is not appropriate for rebooting your machine.

       if [ -f /etc/package ]; then
               if [ -f /.package ]: then
                       /etc/package -v -c `cat /.package` >/dev/console
               else
                       /etc/package -v >/dev/console
       fi
       case $? in
       0)
               echo "Package completed successfully" >/dev/console 2>&1
               date >/dev/console 2>&1
               ;;
       4)
               echo "Rebooting to restart system" >/dev/console 2>&1
               echo >/fastboot
               shutdown
               ;;
       *)
               echo "Update failed, continuing anyway" >/dev/console 2>&1
               ;;
       esac
       fi