|
|
researchv10 Norman
# This shell will start a uucico for the system given.
# Options:
# -xN the debugging level for uucico (-x5 default)
# -r force the removal of the status file
# The output is put in /tmp/Name where Name is the name
# of the system name. A tail -f is performed after uucico is started.
STATUS=/usr/spool/uucp/.Status
if [ -x "./uucico" ]; then
UUCICO=./uucico
else
UUCICO=/usr/lib/uucp/uucico
fi
REMOVE=""
X="-x5"
SYS=
while [ $# -gt 0 ]
do
case $1 in
-x) shift; X="-x$1"; shift;;
-x*) X=$1; shift;;
-r) REMOVE="y"; shift;;
*) SYS="$1"; shift;;
esac
done
if [ -z "$SYS" ]
then
echo "$0: system name required"
exit 1
fi
# use 7 character maximum name length (SYSNSIZE in uucp.h) for search
SYSTEM=`echo $SYS | cut -c1-7`
# check for existence in L.sys
# This is a bit complicated because one has to worry about
# names that may be prefixes of others!
XX=
XX=`uuname | grep $SYSTEM `
if [ -z "$XX" ]
then
echo "Invalid system name \"$SYSTEM\""
exit
fi
set $XX
FULLNAME=$1
for i
do
if [ $i = $SYS ]; then
FULLNAME=$SYS
break
fi
done
STMP=/tmp/$FULLNAME
rm -f $STMP
> $STMP
chmod 660 $STMP
# remove old status file
if [ -n "$REMOVE" ]; then
rm -f $STATUS/${FULLNAME}
fi
echo "$UUCICO -r1 -s$FULLNAME $X >$STMP 2>&1&"
$UUCICO -r1 -s$FULLNAME $X >$STMP 2>&1&
echo "tmp=$STMP"
tail -f $STMP
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.