#! /bin/sh
#
# @(#)badodb	1.3	LPS_UNX_COM	2/19/95
#
# Copyright 1993   Digital Equipment Corporation, Maynard, MA
#
# badodb
#
# A simple shell script to alert the user of some sort of error within
# the LPS Object Database (LPSODB).  After displaying an error message,
# this script will either do a `kill -1' to the process if either the
# $LPSSETUP or $LPSINSTALL variable is non-null, or "exit 1" otherwise.
#
# Parameters:
#    $1 - Path of an optional log file containing the error message.
#
# Global variables:
#    LPSODB - The path of the LPS Object Database file being used.

echo
echo "    A problem has been found in the LPS Object Database on this"
echo "    system (contained in the file \"$LPSODB\")."
if [ "$1" ]
then
    echo
    echo "    Here is the description of the problem:"
    echo
    cat $1
fi
echo
echo "    Please try to correct this situation and re-run this procedure."
echo

if [ "$LPSSETUP" ]
then
    kill -1 $LPSSETUP
elif [ "$LPSINSTALL" ]
then
    kill -1 $LPSINSTALL
fi

exit 1
