[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Non-interactive modem hangup



<branden@apocalypse.sequitur.org> writes:

[snip]

> What I'm after is something simple I can put into a script for sudo
> to kill the ppp daemon and also hang up the line, freeing /dev/ttyS1
> immediately (rather than waiting for the ISP to idle out the line and
> hang up on me).
> 
> The first part I've got figured out --
> 
> start-stop-daemon --stop --verbose --exec /usr/sbin/pppd

Maybe add --pidfile /var/run/ppp0.pid if you know which interface it
will be using.

If you have "modem" somewhere in your pppd options, it should lower
DTR when killed, which should make your modem hang up.  You might need
to send some AT... command to enable this behaviour.

Otherwise, is this simple enough?  For pppd, add this option somewhere
(command line, /etc/ppp/options, etc.):

    disconnect "/usr/sbin/chat -- \d+++\d\c OK ath0 OK"

(from the PPP-HOWTO).

-- 
                Carey Evans  <*>  c.evans@clear.net.nz

	    "Lies, damn lies, and computer documentation."


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: