
echo "\nMoving MultiView device drivers...................\c"

mv tmp/MVWC  tmp/MVWS /usr/sys/boot.d >> errorlog 2>&1

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

echo "OK"

echo "\nMoving MultiView kernel control files.............\c"

mv tmp/mvwc  tmp/mvws /usr/sys/master.d >> errorlog 2>&1

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

echo "OK"

echo "\nResetting MultiView kernel control files..........\c"

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

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


if [ -f boot.mk ]
   then

   mv boot.mk boot.mk.bak

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

fi
echo "OK"

echo "Creating MultiView kernel.........................\c"

home=`pwd`
cd /usr/sys
make >> $home/errorlog 2>&1

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

cd $home
ln /unix /unix.mvw >> errorlog 2>&1

echo "OK"

exit 0
