Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Oct 1998 18:25:40 +0000
From:      Brian Somers <brian@Awfulhak.org>
To:        Paul Dekkers <psd@cgu.nl>
Cc:        Brian Somers <brian@Awfulhak.org>, Francisco Reyes <francisco@natserv.com>, FreeBSD Mailinglist <freebsd-questions@FreeBSD.ORG>
Subject:   Re: serve Callback (like NT does?) 
Message-ID:  <199810251825.SAA02861@woof.lan.awfulhak.org>
In-Reply-To: Your message of "Sat, 24 Oct 1998 09:25:36 %2B0200." <Pine.BSF.3.96.981024092054.8499B-100000@chippie.cgu> 

next in thread | previous in thread | raw e-mail | index | archive | help
> | 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<number>' and /dev/cuaa1 e.g.
> 'ATDT0<number>' (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: <P.Dekkers@cgu.nl>
> To err is human, to moo bovine

Cheers.

-- 
Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <brian@OpenBSD.org>
      <http://www.Awfulhak.org>;
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810251825.SAA02861>