[Techtalk] pppd and wvdial

Almut Behrens almut_behrens at yahoo.com
Wed Oct 10 11:02:04 EST 2001


On Mon, Oct 08, 2001 at 02:02:43PM +0200, Christos Karafilidis wrote:
> 
> I have not much experience with Linux and I am trying to build an On
> Demand Dialup server for my small home LAN.
> I am using Suse6.2 an wvdial.dod from Suse. 
> Wvdial.dod starts the pppd with wvdial as connect script
> wvdial is well configured and work fine when started manually,
> but when pppd start wvdial, wvdial says that the modem is not
> accessible, because its in use.

just guessing, but it looks like there is some problem with both pppd
and wvdial trying to obtain a lock for the modem device. Not exactly
sure, though, why this might be happening -- in principle, I'd assume
that the wvdial.dod script should be taking care of starting the
programs with the correct options (i.e. pppd without option 'lock').
It could be the indirect result of a permission problem, stale lock
file. etc. However, other causes are conceivable as well...

Rather than taking the theoretical approach and trying to come up with
every conceivable constellation of things that could possibly be going
wrong, I'd suggest that you go the empirical route and have strace tell
you where things actually *are* going wrong (yes, I know, I always
recommend strace -- but it *is* a great debugging tool :). It will
considerably narrow down on what you'll have to take a closer look at.
Startup wvdial.dod under strace, using something like:

strace -e trace=file,write,execve,fork -f -o /tmp/wvdial.trace ./wvdial.dod start

(on one line, of course -- just in case something felt like wrapping
the line...)

Then try to initiate a dial-on-demand connection, as usual. A debug log
/tmp/wvdial.trace will be produced containing all file-specific system
calls made and whether they succeeded or failed.  Start by looking at
the end of this file and work your way up. In particular, watch out for
errors related to /var/lock/* stuff or similar.  The output may look a
bit daunting, but chances are good that it'll tell you quite precisely
where wvdial is choking, and what it tried to do immediately before.

(Note: strace will refuse to run setuid-root programs with effective
privileges of root when started by an ordinary luser. So, because of
pppd, you will probably need to run it as root and use the option -u
to establish the correct uid/gids of the normal user -- see manpage.)

In case you can't make too much sense of what you're seeing, feel free
to send me a copy of the strace log (privately, gzipped, please), and
I'll take a look at it -- as time permits. (When I find something I'll
report back to the list, so others who might happen to encounter a
similar problem will have a chance to look it up in the archives.)

Tschoe,

- Almut





More information about the Techtalk mailing list