Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!tut.cis.ohio-state.edu!att!laidbak!katzung From: katzung@laidbak.UUCP (Brian Katzung) Newsgroups: comp.sources.d Subject: Re: callback source Keywords: callback, getty, login Message-ID: <2359@laidbak.UUCP> Date: 22 May 89 04:32:45 GMT References: <180004@mechp10.UUCP> <324@arc.UUCP> Reply-To: katzung@laidbak.UUCP (Brian Katzung) Organization: Lachman Associates, Inc., Naperville, Illinois Lines: 46 In article <324@arc.UUCP> chet@arc.UUCP (Chet Wood) writes: >In article <180004@mechp10.UUCP>, Greg Klein writes: > >> About a month ago I posted a request for getty and login source code that >> I could use to write a callback program. Here's what I came up with. > >Thanks for posting this, Greg. But it looks like the cornerstone of >your program is ct(1), which I can't find a hint of on my SunOS4.0. > >Does anybody have a call back program that'll work under BSD? I was under the impression that ct (call terminal) was normally a link to cu (call Un*x), but I don't remember for sure. Check the cu or tip man pages for hints. On Sun machines, you don't have to do anything with getty or login. The strategy I used is: hangup, dial out on the dial out device corresponding to the line on which you dialed in, and exit with the HUPCL bit turned off. Getty automatically resumes because you now have a connection with a carrier and nothing happening on the dial out device. These are exactly the conditions which allow the dial in device to open! This works because of the Sun feature of mutually exclusive dial in and dial out minor devices for each line. This scheme should work for any other system with this feature. The script I have is based on a cu- and tip-like program I wrote called call. It has options to leave HUPCL unset, and to exec programs upon connection (in the callback case, anything that exits quickly, such as /bin/true or /bin/exit, will do). If you want the callback script (short) or the call program (medium), send me some mail. I suppose if there is enough interest, I could post the sources. A commissioned version of callback written in C is also available as part of some sort of system adminstration package distributed by UC Berkeley, I believe. I can get you in contact with someone for more info about this, if you like. I may still have an old old version of kermit that I hacked to run inside of call, too. -- Brian Katzung ...!laidbak!katzung