#
# EGA Driver Install Script
#	Paul W. Carlson		Jan. 1989
#
TMP=/tmp/ega.err
ERROR1=" Errors have been written to the file $TMP."
ERROR2=" The EGA Driver software was not installed.
Call Paul Carlson, FTS 832-6795, if you need more information."
echo
echo
echo
echo
echo "                         Installing EGA Device Driver"
echo "                                Version 1.03"
echo "                    Author: Paul W. Carlson   FTS 832-6795"
echo
echo

# Check if driver is already installed
/etc/conf/bin/idcheck -p ega 2>$TMP
if [ $? != 0 ]
then
    /etc/conf/bin/idinstall -d ega
fi

# If it isn't, install the driver installation package
/etc/conf/bin/idinstall -a ega 2>>$TMP
if [ $? != 0 ]
then
    message "There was an error during package installation. $ERROR1 $ERROR2"
    exit 1
fi

# Rebuild the kernel
/etc/conf/bin/idbuild 2>>$TMP
if [ $? != 0 ]
then
    /etc/conf/bin/idinstall -d ega
    message "There was an error during Kernel reconfiguration. $ERROR1 $ERROR2"
    exit 1
fi

rm -f $TMP
echo
echo "Installation of the EGA Device Driver is complete."
echo
echo
exit 0
