From owner-freebsd-questions Sun Oct 25 15:35:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA28415 for freebsd-questions-outgoing; Sun, 25 Oct 1998 15:35:13 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from awfulhak.org (awfulhak.force9.co.uk [195.166.136.63]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA28396 for ; Sun, 25 Oct 1998 15:35:08 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from woof.lan.awfulhak.org (root@woof.lan.awfulhak.org [172.16.0.7]) by awfulhak.org (8.8.8/8.8.8) with ESMTP id SAA27915; Sun, 25 Oct 1998 18:25:33 GMT (envelope-from brian@Awfulhak.org) Received: from woof.lan.awfulhak.org (brian@localhost [127.0.0.1]) by woof.lan.awfulhak.org (8.9.1/8.9.1) with ESMTP id SAA02861; Sun, 25 Oct 1998 18:25:40 GMT (envelope-from brian@woof.lan.awfulhak.org) Message-Id: <199810251825.SAA02861@woof.lan.awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: Paul Dekkers cc: Brian Somers , Francisco Reyes , FreeBSD Mailinglist Subject: Re: serve Callback (like NT does?) In-reply-to: Your message of "Sat, 24 Oct 1998 09:25:36 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 25 Oct 1998 18:25:40 +0000 From: Brian Somers Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > | When you set up your -direct profile, use > | > | set device /dev/cuaa0 /dev/cuaa1 /dev/cuaa2 > | > | When the dialback happens, it tries to open the devices in sequence > | as per a normal call - trying cuaa0 first, if that's busy it tries > | cuaa1 and if that's busy it tries cuaa2. > > That's a good idea. Can I setup also that there's a different prefix on > each line? So that /dev/cuaa0 has just 'ATDT' and /dev/cuaa1 e.g. > 'ATDT0' (so that I can use an inside-line for it :-)) The only thing I can think of would be to change the ATDT bit of your dial script to the name of a script (prefixed with a ``!''), and have the script figure out what device you're talking to. This can be done by finding out your parent process id, grepping that from /var/run/tun*.pid, then grepping tunX (whichever contained the pid) from /var/run/*.if. You can then ``echo'' a number based on this info... > By the way, is it possible to make a system that kicks of the user when > calling back after 30 mins or something? We don't want to pay that much > for our user-callback, and really because they don't need more than 15 > mins to upload stuff... I thought maybe that's possible in the ppp.linkup > or something? (Can I get the process-number of the running ppp there, and > kill it after a sleep?) Sure. !bg sh -c "sleep 1800; kill `cat /var/run/INTERFACE.pid`" but you probably want to be careful that ppp hasn't shut down and another started up before the sleep expires.... > Thanks for your help! > Paul > > -- > Paul Dekkers > E-Mail: > To err is human, to moo bovine Cheers. -- Brian , , Don't _EVER_ lose your sense of humour.... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message