Re: how to find out pppd's exit status?
andrej hocevar <firstname.lastname@example.org> wrote:
I've noticed that creating a file each time I run pon and deleting
it each time I run poff or echoing some information when one of
those is issued doesn't always help: whatever information I want to
retrieve, I don't know the pppd's exit status.
For example, if I try to connect and I get a busy-signal, I'll
never notice since poff will never be called and no information will
be logged that way. (Well, of course _I_ will notice, but not a
program depending on that information). So I was wondering how to
catch that exit code. would this help or should I look for something
else? I thought I could start writing information to a file as soon
as I'd find out about pppd's status: if it got a busy-signal or
anything else, no information would be written to the file. Can I do
it in a script?
The example you gave (busy signal) usually is part of the chatscript for
that connection. These are the "ABORT" commands. Another one is "no
There are several config options to get these things echoed to your
screen or to a file during the execution of the chatscript. You might
want to consult "man chat" and review the various config options
available.... maybe one of these will give you what you want. I know
this isn't exactly what you asked for, but maybe it will suffice to get
you heading in the right direction.