Re: strange pppd question
On Tue, Aug 17, 1999 at 12:52:03AM -0500, Nathan E Norman wrote:
> Strange what I'm doing; pppd works fine :)
>
> I'm trying to write a daemon (in perl) that monitors the "health" of the
> next hop on an ethernet port (think DSL or cable connection), and dials
> a provider when the connection goes down. To do this, I need to invoke
> pppd from my prgram ... pppd forks and disconnects to do this, so I have
> no easy way to determine WHEN the link is up (I delete the eth default
> route and add a ppp0 default route only once the dial-link is up, or
> that's the plan). Right now I have to use sleep and that's plain ugly
> (and doesn't always work when the dial server is cranky).
>
> So, how to discover that pppd is up and running on a link? Perhaps I'm
> being incredibly dense here (I'm sure I am) but I don't see how to do it
> ...
>
> Any ideas? Am I re-inventing a wheel?
Well, one kinda round-about way would be to write a script that
could 'signal' your daemon and put it in the /etc/ppp/ip-up.d
directory. I don't think ip-up is run until after pppd has
completed the link.
Mike
[Private mail welcome, but no need to CC: me on list replies.]
--
Michael Merten <mikemerten@yahoo.com>
---> Debian GNU/Linux Fan -- http://www.debian.org
---> CenLA-LUG Founder -- http://www.angelfire.com/la2/cenlalug
--
To invent, you need a good imagination and a pile of junk.
-- Thomas Edison
Reply to: