
if [ -f /usr/sys/boot.d/MVW? ]
  then
    echo "Removing MultiView device drivers.................\c"

    rm /usr/sys/boot.d/MVW? >> errorlog 2>&1

    if [ $? != 0 ]
      then
        echo "ERROR\n  Can't remove driver files."
        exit 1
    fi

    echo "OK"
fi

if [ -f /usr/sys/master.d/mvw? ]
  then
    echo "Removing MultiView kernel control files...........\c"

    rm /usr/sys/master.d/mvw? >> errorlog 2>&1

    if [ $? != 0 ]
      then
        echo "ERROR\n  Can't remove kernel control files."
        exit 1
    fi

    echo "OK"
fi

decide=no

if [ -f /unix.mvw ]
  then
    decide=yes

    rm -f /unix.mvw >> errorlog 2>&1

    if [ $? != 0 ]
      then
        echo "ERROR\n  Can't remove unix.mvw."
        exit 1
    fi

  else

  if [ -x /bin/nm ]
    then
      nm /unix | grep mvw > /dev/null 2>&1
      if [ $? = 0 ]
         then
           decide=yes
      fi
  fi

fi

if [ $decide = yes ] && [ $1 != save ]
  then
    echo "Creating Non MultiView kernel.....................\c"

# Makefile saves unix so we don't have to

    home=`pwd`
    cd /usr/sys

    mv boot.mk boot.mk.mvw

    if [ $? != 0 ]
      then
        echo "ERROR\n  couldn't save boot.mk"
        exit 1
    fi

    make >> $home/errorlog 2>&1

    if [ $? != 0 ]
      then
        echo "ERROR\n  make failed."
        exit 1
    fi

    cd $home

    echo "OK"

fi

exit 0
