rm -r /usr/ivp/test
mkdir /usr/ivp/test
cd /usr/ivp/test
cp /usr/ivp/ivpexec.c ivpexec.c
if cmp /usr/ivp/ivpexec.c ivpexec.c
then
        echo "ivp: cp appears to succeed."
        ed ivpexec.c < /usr/ivp/ivpedcmds > /dev/null
        if cc -o ivpexec ivpexec.c
        then
                echo "ivp: cc appears to work."
        else
                echo "ivp: cc fails, cannot continue."
                exit 1
        fi
        if /usr/ivp/ivpstart
        then
                echo "ivp: Test appears to have worked."
                echo "     Note that accounting has been turned off."
                exit 0
        else
                echo "ivp: Test has not run cleanly, examine the error messages"
                echo "     produced, and try to correct the problem."
                echo "     Note that accounting may have been turned off."
                exit 1
        fi

else
        echo "ivp: cp fails, cannot continue."
        exit 1
fi
