CHAPTER 6: INSTALLING SAMPLE PACKAGE FILES
6.1 . . . . Loading the Files
6.1.1 . . . . . . Loading the Files into AFS Using a Local Tape Drive
6.1.2 . . . . . . Loading Files into AFS from /usr/wsadmin
6.2 . . . . Using the Sample Package Files
6. INSTALLING SAMPLE PACKAGE FILES
The package program aids in the administration of client workstations by
verifying the contents of the local disk against a configuration file. In the
case of disagreements with the configuration file, package makes needed updates
to the local disk by copying over files and directories from AFS (as long as
the configuration file contains no errors and all of the master copies exist in
AFS). It also deletes any files or directories that are not a part of the
configuration file. If the kernel on the local disk is updated, package forces
a reboot of the workstation so the most up-to-date software will run.
This chapter describes how to modify sample package files for your environment.
However, certain system binaries must reside in AFS before package is
functional, and the sample package files must be modified. Refer to Chapter 14
of the AFS System Administrator's Guide for detailed information about package.
6.1. LOADING THE FILES
The files you need to use package, along with sample files, are in the sixth
tar file on the AFS Binary Distribution Tape. See the following instructions
to load them onto the local disk using a local or remote tape drive.
In this section you will load the package files into an AFS volume you create
to house them. The package program will access these files in AFS rather than
on the local disk, which is possible because package runs after afsd at each
reboot.
6.1.1. LOADING THE FILES INTO AFS USING A LOCAL TAPE DRIVE
If the local machine has a tape drive, follow these instructions to mount the
Binary Distribution Tape and unload the package files into an AFS volume.
Step 1: Create and mount a volume to house the package files. A
recommended name is wsadmin or cellname.wsadmin. The ACL on the
volume's root directory by default gives all access rights to
system:administrators.
--------------------------------------------------------
# vos create <machine name> <partition name> wsadmin
# cd /afs/.<cellname>
# fs mkmount wsadmin wsadmin
# vos release root.cell
# fs checkvolumes
--------------------------------------------------------
Step 2: Mount the AFS Binary Distribution Tape and load the files from the
sixth tar set into /afs/cellname/wsadmin.
---------------------------------------------------------------------------------
On AIX systems: Before reading the tape, verify that block size is set to 0
(meaning variable block size); if necessary, use SMIT to set block size to 0.
Also, substitute tctl for mt.
On HP-UX systems: Substitute mt -t for mt -f.
---------------------------------------------------------------------------------
6.1.2. LOADING FILES INTO AFS FROM /USR/WSADMIN
If the local machine does not have a tape drive, you must load the package
files into /usr/wsadmin on a remote machine and from there into the AFS volume.
Step 1: Create a /usr/wsadmin directory on the remote machine, and load
the package files into it.
--------------------------------------------------------------------------------------
Note: If the tape drive is attached to an AIX system, use tctl instead of mt.
If the system is an RS/6000, further verify that block size is set to 0 (meaning
variable block size); if necessary, use SMIT to set block size to 0 before reading
the tape.
On HP-UX systems, use mt -t rather than mt -f.
For <device>, substitute the name of the tape device for your system that
does not rewind after each operation.
# mkdir /usr/wsadmin
# cd /usr/wsadmin
# mt -f /dev/<device> rewind
# mt -f /dev/<device> fsf 5
# tar xvf /dev/<device>
--------------------------------------------------------------------------------------
Step 2: Create and mount a volume to house the package files. A
recommended name is wsadmin or cellname.wsadmin. The ACL on the
volume's root directory by default gives all access rights to
system:administrators.
--------------------------------------------------------
# vos create <machine name> <partition name> wsadmin
# cd /afs/.<cellname>
# fs mkmount wsadmin wsadmin
# vos release root.cell
# fs checkvolumes
--------------------------------------------------------
Step 3: Copy the files from /usr/wsadmin to /afs/cellname/wsadmin using
cp, ftp, NFS, or another network file transfer utility.
6.2. USING THE SAMPLE PACKAGE FILES
The /afs/cellname/wsadmin/etc directory contains package configuration files
that were built from the prototype files in src and the libraries in lib. You
never need to directly edit any of the files in this directory. These files
are modified by running make.
The /afs/cellname/wsadmin/lib directory contains the package library files
referred to by the prototype files. Files specific to a machine type are
called sysname.type.
The /afs/cellname/wsadmin/src directory contains the prototype files used to
build configurations. These prototype files include library files from the
libraries in /afs/cellname/wsadmin/lib.
The minimal.* files are the minimum needed to keep the most recent version of
AFS on the system. These are built from /afs/cellname/src/minimal.proto, which
is built from (among other files) lib/rt_aix221.AFS or lib/43.AFS. You should
use the minimal files, and build upon them. The staff.* files are examples of
more detailed package files.
Follow these steps to change the minimal files for your system:
Step 1: Edit /afs/cellname/wsadmin/lib/base.generic to contain your
cellname.
Step 2: Edit /afs/cellname/wsadmin/lib/*.readonly to contain your cellname
and point to your compilation directories. For example, in the
Transarc tree there are three different destinations: /usr/afs.rel,
/usr/afs.test, and /usr/afs.dev. You will probably want to set all
of these directories to /usr/afsws.
Step 3: Verify that /etc/package exists on each machine's local disk. If
it does not, install a copy from AFS and add execute permission.
-------------------------------------------------------------------
# cp /afs/<cellname>/<sysname>/usr/afsws/etc/package /etc/package
# chmod +x /etc/package
-------------------------------------------------------------------
Step 4: Create the package configuration file on each machine.
---------------------------------------------------------------
# echo "/afs/<cellname>/wsadmin/etc/minimal" > /.package
---------------------------------------------------------------
Step 5: Add commands to the machine's initialization file (/etc/rc or
equivalent) to invoke package.
----------------------------------------------------------------------------------
Add the following lines to the initialization file (such as /etc/rc) after the
lines that invoke afsd.
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
/etc/reboot
;;
*)
echo "Update failed, continuing anyway" >
/dev/console 2>&1
;;
esac
fi
----------------------------------------------------------------------------------
Step 6: Build the new configuration files so your changes are incorporated
into the package files in /afs/cellname/wsadmin/etc, after verifying
that the current path environment includes needed definitions.
--------------------------------------------------------------------------------
Before running the following commands, verify that /usr/afsws/bin and
/usr/afsws/etc are included in the current path environment definition. Add
them if necessary; errors will result if these directories are not defined.
# cd /afs/<cellname>/wsadmin/src
# make system wsadmin=/afs/<cellname>/wsadmin
--------------------------------------------------------------------------------