#!/bin/sh
echo "Installing the driver files in your linux-tree (>=lx99pl14)."
cp -p driver/b004.h /usr/src/linux/include/linux
cp -p driver/b004.c /usr/src/linux/drivers/char
cp -p iserver/iserver /usr/bin/iserver
cp -p afserver/afserver /usr/bin/afserver
echo "Creating devices."
if [ ! -c /dev/link0 ] ; then
  mknod /dev/link0 c 24 0;
fi
if [ ! -c /dev/link1 ] ; then
  mknod /dev/link1 c 24 1;
fi
if [ ! -c /dev/link2 ] ; then
  mknod /dev/link2 c 24 2;
fi
chmod a+rw /dev/link?
chmod a+rx /usr/bin/afserver
chmod a+rx /usr/bin/iserver
echo "Installing manual page."
if [ ! -d /usr/man/man4 ] ; then
  mkdir /usr/man/man4
fi
cp -p link.4 /usr/man/man4/link.4
./modify
echo "The source code of the driver has been installed."
echo "Now recompile the kernel doing a make dep; make Image"
