Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How to make WVDIAL disconnect from script..?< Next Oldest | Next Newest >
icepick Offline

Group: Members
Posts: 38
Joined: Dec. 2006
Posted: Dec. 14 2008,18:02 QUOTE

I am using wvdial to dial up to a provider with an analog modem.. this works great.. it's all done from a script.. but whats the easiest and safest way to make the modem disconnect after an X amount of minutes? I need to prevent the line staying open by accident since I pay per minute..
Any ideas?
Back to top
Profile PM 
mikshaw Offline

Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 14 2008,20:03 QUOTE

You can do something close with pppd (/opt/ppp/options), so it will work regardless of what method you use to dial:
idle n
   Specifies that pppd should disconnect if the link is idle for n seconds. The link is idle when no data packets (i.e. IP packets) are being sent or received. Note: it is not advisable to use this option with the persist option without the demand option. If the active-filter option is given, data packets which are rejected by the specified activity filter also count as the link being idle.

Or you could make a shell script script wrapper for wvdial, which starts wvdial (backgrounded), sleeps a specified number of minutes, and then disconnects.  I'm not sure if wvdial can be made to disconnect remotely, but if not you can always use "sudo poff".  This would require that wvdial is not configured to automatically redial when you lose a connection.

Back to top
Profile PM WEB 
1 replies since Dec. 14 2008,18:02 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Quick Reply: How to make WVDIAL disconnect from script..?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code