#! /bin/sh

ETC=`/bin/dirname $0`
if [ "$ETC" = "." ]; then
        ETC=`pwd`
fi

cat $ETC/reg_blurb

response=`ckyorn -Q -p 'Will you help promote further development of SE?'`

case $response in
y*|Y*) org=`ckstr -r '.*' -p 'Name of company or organization?'`
       cc=`ckstr -r '.*' -h 'Enter an e-mail address or q for none' -p 'CC'`
       if [ "$cc" = "q" ]; then
         cc=
       fi
       sys=`/bin/uname -a`
       cat << EEOOFF > $ETC/reg_info
To: se-feedback@setoolkit.com $cc
Subject: SE 3.2.1 Auto-Response

ORGANIZATION: $org
SYSTEM      : $sys
EEOOFF

       /usr/lib/sendmail se-feedback@setoolkit.com $cc < $ETC/reg_info &
       ;;
n*|N*)
       echo No thanks. > $ETC/reg_info
       ;;
*)     ;;
esac

exit 0

