You are not logged in.

#1 2011-08-20 20:30:29

ShionjiYuuko
Member
Registered: 2011-07-31
Posts: 67

netcfg dial-up

hello, I'm having problem with netcfg for dial-up connection (pppd)

if somehow the pppd exits unexpectedly (usually 'peer not responding' error), the corresponding pid file will be deleted. when I tried to restart ppp profile netcfg it will give error message that it can't find pid file, and then it will assume nothing has gone wrong with the connection. I can't set the profile down, or restart it, basically the profile is locked as 'up', and I have no clue what file I need to delete in order to reset netcfg ppp to down state.

the obvious problem is that netcfg can't detect pppd's status, whether it is still running or already killed. is there any workaround for this, maybe better configuration I skipped somehow?

thanks smile


始まりの荒野を独り もう歩き出してるらしい、僕は灰になるまで僕で有り続けたい
http://about.me/nnhnkn | http://identi.ca/nnhzkn

Offline

#2 2011-08-21 11:06:24

dolik.rce
Member
From: Czech republic
Registered: 2011-05-04
Posts: 43

Re: netcfg dial-up

Hi, I'm having the very same problem here. Unfortunately, I don't know how to handle it correctly, but at least I can share with you how I trick the netcfg into taking the connection into the down state:

sleep 10& echo $$ | sudo tee /var/run/ppp-<my_connection>.pid && sudo netcfg -d <my_connection>

What it does is just launching a harmless sleep command and writing its pid into the file where netcfg expects it. Then it can take the connection down by signaling the sleep command instead of the pppd and everyone is happy :-)

Of course, if anyone knows a proper solution I'd be very happy to hear it wink

Offline

#3 2011-08-21 11:29:49

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: netcfg dial-up

No idea if it's the correct solution, but this is what I do:

--- /usr/lib/network/connections/ppp.orig	2011-08-09 00:29:16.000000000 +0200
+++ /usr/lib/network/connections/ppp	2011-08-21 13:28:18.798200619 +0200
@@ -23,7 +23,6 @@
         PID=$(head -1 $PIDFILE)
         [[ -n "$PID" ]] && kill "$(head -1 $PIDFILE)"
     fi
-    kill "$(head -1 $PIDFILE)"
 }
 
 ppp_$1 "$2"

Offline

#4 2011-08-22 00:49:54

ShionjiYuuko
Member
Registered: 2011-07-31
Posts: 67

Re: netcfg dial-up

thanks for your creative solutions. not really  clean but we can use it for a while


始まりの荒野を独り もう歩き出してるらしい、僕は灰になるまで僕で有り続けたい
http://about.me/nnhnkn | http://identi.ca/nnhzkn

Offline

Board footer

Powered by FluxBB