Cu calls to dumb terminal
Alan Bryce
alan at motcsd.UUCP
Thu Sep 7 06:12:51 AEST 1989
cu will call another unix system or dumb terminal using the following script.
#########################################################################
#! /bin/sh
#@ident Call.script 4/89
OUTCALL=/dev/ttyXXX
FIL=a file containing cu commands
#########################################################################
# Attempt to call remote terminal/system and spawn a getty.
#########################################################################
[ $# = 0 ] && echo "NO DESTINATION GIVEN" && exit
rm /usr/spool/locks/LCK..${OUTCALL}
sleep 3
chmod +rw ${OUTCALL}
TIME=`date`
sleep 10
case $1 in
name1) if cu -s2400 -d -t PHONENUMBER<$FIL 1>/CALLOUT 2>/CALLOUT
then :
else cu -s2400 -d -t PHONENUMBER<$FIL 1>/CALLOUT 2>/CALLOUT
fi ;;
*) echo "Calling $1"
if cu -d -s2400 -t $1
then :
else cu -d -s2400 -t $1
fi ;;
esac
#########################################################################
1) Set up file containing the following:
~!/etc/getty /dev/ttyXXX 2400 &
~!date
Define that file as variable FIL in call script.
2) Set tty using uugetty in inittab.
3) Call into modem and logon.
Issue command "nohup /bin/call XXXXX &
Logoff and disconnect.
Systems calls in 1 minute.
4) Of course your uucp lib files must contain proper info..Devices etc..
More information about the Comp.unix.wizards
mailing list