If you install WebSphere Application Server on an AIX system, and issue the lppchk command, you receive errors for some of the installed files. These errors do not affect the installation, running and uninstallation of the product. To eliminate these errors, run the following script:
#!/bin/ksh # # ORIGINS: 27 # # (C) COPYRIGHT International Business Machines Corp. 2002-2003 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # Created: August 16, 2002 # Author: Jennifer Dietrich, IBM - Austin # Contributors: Mark Gunning and John Sullivan # # Purpose: This script should be run after the installation of WebSphere # Application Server 5.01. This script will clean up all lppchk # errors related to the installation of WebSphere and IHS on the # system. There is no checking to see if lppchk may be reporting # a valid error for these products; all errors are cleaned up. # # Note: This script must be executed as the root user. # #-------------------------------------------------------------------------- export LC_ALL=C OUTDIR=/tmp/was_clean.$$ IMAGE_LIST=$OUTDIR/image_list script=`basename $0` #--------------------------- # Make sure the user is root #--------------------------- if [ `/usr/bin/id -u` != "0" ] then echo "$script: You must be root to run $script." exit 0 fi #--------------------------------------- # Create a directory to store the output #--------------------------------------- mkdir $OUTDIR >/dev/null 2>&1 #-------------------------------------------------------------------------- # Get the list of WebSphere products installed on the system with WAS 5.01 # so that each can be cleaned up. Note that gskkm and mqm do not produce # lppchk errors so their filesets are not included in the list of filesets # to check. # # The output from the following command is of the form: # # ODM_DIR:fileset # #-------------------------------------------------------------------------- lslpp -qacl IHS\* WSB\* wemps\* 2>/dev/null | cut -f1,2 -d: > $IMAGE_LIST #----------------------------------- # Process each fileset one at a time #----------------------------------- cat $IMAGE_LIST | while IFS=: read ODMDIR fileset do #------------------------------ # Set ODMDIR for this iteration #------------------------------ export ODMDIR #----------------------------------------------------------------------- # If the fileset has files associated with it, we want to process it. # Each fileset part (USR, ROOT, SHARE) which has no files associated # with it will have an entry ending in ":NONE". If these are the # only entries for a fileset then no further processing is required # since there are no inventoried files associated with that fileset and, # hence, no errors. #----------------------------------------------------------------------- num_files=`lslpp -qfc $fileset | grep "^$ODMDIR:" | grep -v ':NONE$' | wc -l` if (( $num_files > 0 )) then #--------------------------------------------------------------- # Get the list of all of the lppchk errors for this fileset part #--------------------------------------------------------------- lppchk -c $fileset 2> $OUTDIR/$fileset.lppchk #----------------------------------------------------- # If there are errors to clean up, continue processing #----------------------------------------------------- if [ -s $OUTDIR/$fileset.lppchk ] then #------------------------------------ # Get the lpp_id of this fileset part #------------------------------------ lpp_id=`odmget -q name=$fileset lpp | awk '/lpp_id/{print $3}'` #----------------------------------------------------- # Remove the missing files from the inventory database #----------------------------------------------------- grep "could not be located." $OUTDIR/$fileset.lppchk | awk '{print $3 }' | while read file do odmdelete -o inventory -q"loc0=$file and lpp_id=$lpp_id" \ >/dev/null 2>&1 done #------------------------------------------------------- # Process the files with bad checksums and bad size info #------------------------------------------------------- grep "The checksum for file" $OUTDIR/$fileset.lppchk | awk '{print $6 }' > $OUTDIR/$fileset.volatile grep "Size of" $OUTDIR/$fileset.lppchk | awk '{print $4 }' >> $OUTDIR/$fileset.volatile #------------------------------------------------ # Are there checksum or size errors to work with? #------------------------------------------------ if [ -s $OUTDIR/$fileset.volatile ] then #-------------------------------------------------------------- # Sort and uniq the list to make sure we don't process any file # more than once #-------------------------------------------------------------- sort $OUTDIR/$fileset.volatile > $OUTDIR/sort uniq $OUTDIR/sort > $OUTDIR/$fileset.volatile #-------------------------------------------------------------- # Change the checksum and size values for each file to VOLATILE #-------------------------------------------------------------- cat $OUTDIR/$fileset.volatile | while read file do echo "inventory: size = 0\nchecksum = 0" | odmchange -o inventory -q"loc0=$file and lpp_id=$lpp_id" done fi fi rm -f $OUTDIR/$fileset.* 2>/dev/null fi done rm -rf $OUTDIR 2>/dev/null exit 0