From owner-freebsd-current Sun Feb 2 02:20:50 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id CAA11626 for current-outgoing; Sun, 2 Feb 1997 02:20:50 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id CAA11615 for ; Sun, 2 Feb 1997 02:20:37 -0800 (PST) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id LAA13289 for freebsd-current@freebsd.org; Sun, 2 Feb 1997 11:20:31 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.6.9) id LAA25838; Sun, 2 Feb 1997 11:05:56 +0100 (MET) Message-ID: Date: Sun, 2 Feb 1997 11:05:56 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-current@freebsd.org Subject: Re: getty patches References: <19970202171317.RP40411@usn.blaze.net.au> X-Mailer: Mutt 0.55-PL10 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <19970202171317.RP40411@usn.blaze.net.au>; from David Nugent on Feb 2, 1997 17:13:17 +1100 Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As David Nugent wrote: > I have implemented the following in /usr/libexec/getty: Ah, you're going to bloat^H^H^H^H^Hdevelop our getty into another mgetty? :) > 1) Ability to define a modem initialisation script. > 2) Ability to answer incoming phone calls "manually" I don't particularly like these, although unlike mgetty, you make them optional (that's good). I learned to hate the (mis)feature of mgetty to always touch my modem at the wrong time (e.g. after i just hung it up from another program, and wanted to get at it again for redialing). I'm glad i've later on got a modem that doesn't require mgetty anymore. (The best joke mgetty ever gave me was the message that a user named RING has attempted to log in. :-) This basically explains the kind of race conditions you have to expect from such an approach.) IMO, this approach is a lot less cleaner than the default behaviour that assumes the modem knows about its DTE speed, and can autoanswer. Something i've been discussing with the author of mgetty some time ago, and which we agreed to be a Good Thing tm is the implementation of an ``alternate carrier detect''. Right now, the getty has to listen to the port all the time, thus effectively defeating the idea of the split dialin/dialout ports by this (and infact, you gotta run mgetty on the dialout port if you want both directions, or you will fail miserably). Otherwise, it would never get at that RING message. A better alternate solution is to define an additional port option for the dialin port that allows to pick up the port already at the first raising edge of the RI signal (ring indicator), by taking this as a ``pseudo-carrier''. This would still allow for the kernel semaphore that is implied with the split dialin/dialout devices, but would combine well with the desire to manually answer the call: on the first ring, the open() of the dialin device will (prematurely, compared to the classic scheme) complete, the getty could manually answer the ring, and could also decide which login handler to launch, based on the connect message. The port should continue to follow the normal dialin semantics, i.e. once DCD went high, the falling edge of this signal should SIGHUP the process that has this device as a controlling tty. OTOH, an outgoing call won't be disturbed at all by this scenario (unlike with the continously listening getty). The open() on the dialin device will be suspended as soon as the open() on the dialout device succeeds, so the owner of the dialout device can do what he wants during this period. Sure, there's still the race that a RING happens just in this moment, but that's what you gotta live with by sharing one modem for dialin and dialout anyway. > 6) Fixed bugs in the %s, %m, %r and %v macros which don't > currently work [uname() was never being called, thus > the values for these were always blank. rlogin seems to > suffer the same bug]. OK. > 7) Sending a sysv-like "issue" file prior the login prompt. OK. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)