#!/bin/sh
# Copyright (c) 1995  En Garde Systems. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, for NON COMMERCIAL USE are permitted provided that:
# (1) source code distributions retain the above copyright notice and this
# paragraph in its entirety, and (2) distributions including binary code
# include the above copyright notice and this paragraph in its entirety in
# the documentation or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# For commercial use or modification of this program, contact:
# En Garde Systems
# 525 Clara Avenue, Suite 202
# St. Louis, MO  63112
#

if [ $LOGNAME != 'root' ]
then
	echo This script must be run as root.
	exit 1
fi

if [ ! -f ./twtchc ]
then
	echo This script must be run in the directory containing \"twtchc\".
	exit 1
fi

echo Seting up device driver for this system... To do this, we MUST move
echo the \"twtchc\" driver into \"/usr/kernel/drv\". 
echo -n "Procede with this copy? (y/N): " 
read x
if [ $x != 'y' ]
then
	echo "Installation aborted..."
	exit 1
fi
echo Installing...
cp ./twtchc* /usr/kernel/drv
/usr/sbin/add_drv -m "* 0600 root root" twtchc
rm -f /dev/twtchc  
ln -s /devices/pseudo/twtchc@0:twtchc /dev/twtchc
exit 0

