Hello,

I am attempting to right a simple script that uses chat to
talk to the modem, but disconnecting any connection afterwards.

Right now I have:

--- BEGIN ---
#!/bin/sh -e
DEVICE=/dev/ttyS1
LOCKFILE=/var/lock/LCK..ttyS1

lockfile -30 -r10 $LOCKFILE
chmod u+w $LOCKFILE
echo 0$$ > $LOCKFILE
chmod u-w $LOCKFILE
trap 'rm -f $LOCKFILE' EXIT

stty parenb -parodd cs7 < $DEVICE
/usr/sbin/chat -V -f script.chat < $DEVICE > $DEVICE
echo SUCCESS!!
--- END ---

however, the problem with this (besides not being too sure of the
lockfile logic) is that I need to lower DTR to make sure the modem is
disconnected. How can I lower DTR from the shell (or chat) script?

Any suggestions/ideas for improvement?

Thanks in advance.
-- 
Brian May <[EMAIL PROTECTED]>

Reply via email to