#!/bin/sh
#
# file to execute prior to starting main bbs program
#

# check for a password on the account.  If no password, force them to enter
# a password.
found=`fgrep $LOGNAME /etc/passwd | cut -f2 -d":" | wc -c`
while [ "$found" -le "2" ]
do
	echo We will now setup a password for your account.
	echo Please enter a password.
        passwd
	found=`fgrep $LOGNAME /etc/passwd | cut -f2 -d":" | wc -c`
done

IFS=""
PATH=/bin:/usr/bin:/usr/games:/usr/local/bin:/usr/ucb:/bbs/bin
export PATH
BBSDIR=/bbs
SYSOP=shaw
VISUAL="pico -t"
EDITOR="pico -t"
export BBSDIR SYSOP VISUAL EDITOR IFS
SHELL=$BBSDIR/rocat
export SHELL

# hack to get around the getty's problem with not setting CRTSCTS
# #*(@&#%(*&#.  Why can't ANYBODY figure this SIMPLE thing out?
# setup default terminal settings 

stty sane
stty erase "^H" kill "^U" intr "^C" eof "^D" 
stty hupcl ixon ixoff crtscts

exec $SHELL
