* ppp link time limit
@ 2009-09-25 18:20 Davy Leon
2009-09-25 18:28 ` Chris Fowler
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Davy Leon @ 2009-09-25 18:20 UTC (permalink / raw)
To: linux-ppp
Hi guys
I have a link wich I stablish by running
pppd call isp
It' launched by the cron at some scheduled times of the day. I need the link
doesn't stay up for more than 30 min, but doesn't know how to do that. No
matter the link is idle or being used I want to terminate it once reached
the ammount of time specified. How can I do that?
Cheers
David
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ppp link time limit
2009-09-25 18:20 ppp link time limit Davy Leon
@ 2009-09-25 18:28 ` Chris Fowler
2009-09-25 18:40 ` Bill Unruh
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chris Fowler @ 2009-09-25 18:28 UTC (permalink / raw)
To: linux-ppp
maxconnect n
Terminate the connection when it has been available for
network
traffic for n seconds (i.e. n seconds after the first
network
control protocol comes up).
On Fri, 2009-09-25 at 14:21 -0500, Davy Leon wrote:
> Hi guys
>
> I have a link wich I stablish by running
>
> pppd call isp
>
> It' launched by the cron at some scheduled times of the day. I need the link
> doesn't stay up for more than 30 min, but doesn't know how to do that. No
> matter the link is idle or being used I want to terminate it once reached
> the ammount of time specified. How can I do that?
>
> Cheers
>
> David
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ppp link time limit
2009-09-25 18:20 ppp link time limit Davy Leon
2009-09-25 18:28 ` Chris Fowler
@ 2009-09-25 18:40 ` Bill Unruh
2009-09-25 18:51 ` Charlie Brady
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Bill Unruh @ 2009-09-25 18:40 UTC (permalink / raw)
To: linux-ppp
On Fri, 25 Sep 2009, Davy Leon wrote:
> Hi guys
>
> I have a link wich I stablish by running
>
> pppd call isp
>
> It' launched by the cron at some scheduled times of the day. I need the link
> doesn't stay up for more than 30 min, but doesn't know how to do that. No
> matter the link is idle or being used I want to terminate it once reached the
> ammount of time specified. How can I do that?
pppd call isp & sleep 1800; killall pppd
>
> Cheers
>
> David
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273
Physics&Astronomy | Advanced Research | Fax: +1(604)822-5324
UBC, Vancouver,BC | Program in Cosmology | unruh@physics.ubc.ca
Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ppp link time limit
2009-09-25 18:20 ppp link time limit Davy Leon
2009-09-25 18:28 ` Chris Fowler
2009-09-25 18:40 ` Bill Unruh
@ 2009-09-25 18:51 ` Charlie Brady
2009-09-25 18:55 ` Chris Fowler
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Charlie Brady @ 2009-09-25 18:51 UTC (permalink / raw)
To: linux-ppp
On Fri, 25 Sep 2009, Bill Unruh wrote:
> pppd call isp & sleep 1800; killall pppd
The above will kill any pppd process, not just the backgrounded one from
this shell script.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ppp link time limit
2009-09-25 18:20 ppp link time limit Davy Leon
` (2 preceding siblings ...)
2009-09-25 18:51 ` Charlie Brady
@ 2009-09-25 18:55 ` Chris Fowler
2009-09-25 18:56 ` James Carlson
2009-09-25 20:28 ` Bill Unruh
5 siblings, 0 replies; 7+ messages in thread
From: Chris Fowler @ 2009-09-25 18:55 UTC (permalink / raw)
To: linux-ppp
#!/usr/bin/perl
my $pid = fork();
exit 0 if $pid;
$pid = fork();
if($pid = 0) {
exec "/usr/sbin/pppd", ("call", "isp", "nodetach");
exit 1;
}
sleep 1800;
kill 15, $pid;
On Fri, 2009-09-25 at 14:51 -0400, Charlie Brady wrote:
> On Fri, 25 Sep 2009, Bill Unruh wrote:
>
> > pppd call isp & sleep 1800; killall pppd
>
> The above will kill any pppd process, not just the backgrounded one from
> this shell script.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ppp link time limit
2009-09-25 18:20 ppp link time limit Davy Leon
` (3 preceding siblings ...)
2009-09-25 18:55 ` Chris Fowler
@ 2009-09-25 18:56 ` James Carlson
2009-09-25 20:28 ` Bill Unruh
5 siblings, 0 replies; 7+ messages in thread
From: James Carlson @ 2009-09-25 18:56 UTC (permalink / raw)
To: linux-ppp
Davy Leon wrote:
> Hi guys
>
> I have a link wich I stablish by running
>
> pppd call isp
>
> It' launched by the cron at some scheduled times of the day. I need the
> link doesn't stay up for more than 30 min, but doesn't know how to do
> that. No matter the link is idle or being used I want to terminate it
> once reached the ammount of time specified. How can I do that?
I should probably port this option over from the OpenSolaris variant of
pppd:
maxconnect n
Terminate the connection after it has been available for
network traffic for n seconds (that is, n seconds after
the first network control protocol starts). An LCP
Time-Remaining message is sent when the first NCP
starts, and again when 5, 2, and 0.5 minutes are remain-
ing.
Without that option, one way of doing what you ask is to use the
"linkname" parameter to force a reliable PID file name, and then just
sleep and kill the process based on the contents of that file.
--
James Carlson 42.703N 71.076W <carlsonj@workingcode.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ppp link time limit
2009-09-25 18:20 ppp link time limit Davy Leon
` (4 preceding siblings ...)
2009-09-25 18:56 ` James Carlson
@ 2009-09-25 20:28 ` Bill Unruh
5 siblings, 0 replies; 7+ messages in thread
From: Bill Unruh @ 2009-09-25 20:28 UTC (permalink / raw)
To: linux-ppp
Yes, using maxconnect is probably a better idea if you have multiple pppd
running.
On Fri, 25 Sep 2009, Chris Fowler wrote:
> maxconnect n
> Terminate the connection when it has been available for
> network
> traffic for n seconds (i.e. n seconds after the first
> network
> control protocol comes up).
>
>
> On Fri, 2009-09-25 at 14:21 -0500, Davy Leon wrote:
>> Hi guys
>>
>> I have a link wich I stablish by running
>>
>> pppd call isp
>>
>> It' launched by the cron at some scheduled times of the day. I need the link
>> doesn't stay up for more than 30 min, but doesn't know how to do that. No
>> matter the link is idle or being used I want to terminate it once reached
>> the ammount of time specified. How can I do that?
>>
>> Cheers
>>
>> David
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273
Physics&Astronomy | Advanced Research | Fax: +1(604)822-5324
UBC, Vancouver,BC | Program in Cosmology | unruh@physics.ubc.ca
Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-09-25 20:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-25 18:20 ppp link time limit Davy Leon
2009-09-25 18:28 ` Chris Fowler
2009-09-25 18:40 ` Bill Unruh
2009-09-25 18:51 ` Charlie Brady
2009-09-25 18:55 ` Chris Fowler
2009-09-25 18:56 ` James Carlson
2009-09-25 20:28 ` Bill Unruh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.