Return to BSD News archive
Received: by minnie.vk1xwt.ampr.org with NNTP id AA1241 ; Tue, 23 Feb 93 14:31:50 EST Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sun4nl!foxim!rvh From: rvh@foxim.UUCP (Roland van Hout) Newsgroups: comp.unix.bsd Subject: Re: [386bsd] com-beta & dialin Message-ID: <1733@foxim.UUCP> Date: 11 Feb 93 17:21:12 GMT References: <21250022@hpuamsa.neth.hp.com> Organization: Foxim Software, Capelle a/d IJssel, Netherlands Lines: 97 >From article <21250022@hpuamsa.neth.hp.com>, by reink@hpuamsa.neth.hp.com (Reinier Kleipool): > Hello, > > In my opinion you cant dial in AND out with the same port on > 386BSD. The settings are completely different for the two. If you > want to dial out, you should first shut up the getty in /etc/ttys. > If you want to dial in you should put up the getty, and have a > setting in /etc/gettytab to set the line disipline to modem. This is correct I work it like that too with a Worldblazer (V32bis and others), the line speed is fixed at 19200, and besides the lack of real bidirectional ports it works fine now! Make your scripts to put a getty on a port and remove it, it changes the /etc/ttys does a kill -1 1 and possibly you put comcontrol/stty commands in it. But check the /var/spool/uucp/LCK..tty01 and other lockfiles. So you don't put a getty on a port thats calling in or out at the moment! > I also had the problem that my 'intelligent' hayes compatible > (Tornado) modem kept talking to getty. You get a very interesting > conversation between getty (Login:) and my modem saying RING. set your modem to ATQ1E0 and save it, and when you dial out you start with sending a ATQ (preferably after the ATZ) > > Reinier Kleipool. Here is my enable script: CUT HERE---------------- #!/bin/sh # sed /etc/ttys file so the com1 modemport is set to on # but check /var/spool/uucp/LCK..ttyd1 file first # Before we do anything we remove obsolete LCK files! /etc/rmuucplocks if [ -z "$1" ] then dev=com1 else dev=$1 fi portno=`echo $1 | sed "s/com//"` if [ ! -f /var/spool/uucp/LCK..ttyd${portno} -a ! -f /var/spool/uucp/LCK..${dev} ] then sed "/${dev}/s/off/on/" /etc/ttys >/tmp/x$$ cp /tmp/x$$ /etc/ttys rm /tmp/x$$ kill -1 1 fi CUT HERE---------------- And here is my disable script CUT HERE---------------- #!/bin/sh # sed /etc/ttys file so com2 is set to off # and /dev/com2 gets uucp as owner if [ -z "$1" ] then dev="com1" else dev=$1 fi sed "/${dev}/s/on/off/" /etc/ttys >/tmp/x$$ cp /tmp/x$$ /etc/ttys rm /tmp/x$$ /usr/sbin/chown uucp /dev/${dev} kill -1 1 #/usr/local/bin/comcontrol /dev/${dev} bidir CUT HERE---------------- And now the rmuucplocks script CUT HERE---------------- #!/bin/sh #remove old uucp locks # get the pid out and look in the ps list if # the process is gone, then remove the lock for i in /var/spool/uucp/LCK..* do pid=`cat $i|tr -d " "` x=`ps ax | awk '{print $1}' | grep "^${pid}\$"` if [ -z "${x}" ] then rm -f $i fi done CUT HERE---------------- Hope this wil help! Roland van Hout rvh@foxim.nl