*BSD News Article 46009


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!cs.utexas.edu!news.sprintlink.net!EU.net!Germany.EU.net!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!not-for-mail
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Auto-killing slattach?
Date: 24 Jun 1995 23:40:35 +0200
Organization: Private FreeBSD site, Dresden.
Lines: 29
Message-ID: <3si0oj$amq@uriah.heep.sax.de>
References: <kientzleDAJ8zB.FHo@netcom.com> <3sbiuf$t73@bonnie.tcd-dresden.de> <3sfa4t$n32@solaris.cc.vt.edu> <3sh8b0$oa5@clarknet.clark.net>
NNTP-Posting-Host: uriah.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Robert Watson <rwatson@clark.net> wrote:

>Actually, under 2.0.5R, the slattach release writes a pid file to 
>/var/run under the name slattach.devname.pid which contains the pid of 
>the running slattach session for the device.  Just kill -TERM `cat 
>/var/run/slattach.devname.pid`

Fine, it's enlightening to see people are using this feature. :-)

>A question however -- our modem is set to autodial on DTR -- we'd like to 
>have slattach, on receiving a HUP, suppress DTR for 10 seconds, then 
>raise it again to force a redial.

I'm not sure, does a ``stty 0'' also lower DTR?  If so, the following
script should do it:

	#!/bin/sh
	stty -f ${TTY} 0
	sleep 10
	stty -f ${TTY} 38400

You'll get the picture.  Run this as the `redial command'.

If it doesn't work this way, put it into a few lines of C code.
-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)