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

Re: ip-down does not stop ip-up's "run-parts" on disconnect



Thanx for the help ,

        but         >;0).

Right "pppd" doesnt go down if "ip-up" doesnt which wont unless "run-parts" does
which wont unless
all scripts in "ip-up.d" do. And indeed "ip-down" then does not appear to launch
catch 22

( or so i thought ).

(ok im a newby so it may not be the best way but it seems to work here, and it feels
like a clean solution to my problem )

Detach "ip-up" from the script launching process by changing
"run-parts /etc/ppp/ip-up.d"   to  "run-parts /etc/ppp/ip-up.d &"
And now "pppd" stops and runs "ip-down" and everything dies . R.I.P. when i run
"poff"

now i had allready fixed my "ip-up.d" scripts to check if ppp0 is up anyway using (
re your suggestion )
"ifconfig | grep ppp0"   , >;0) so they just exit themselves if "run-parts" invokes
another.

Anyway with the above change "ip-down" now runs and i can kill "ip-up.d" scripts from
"ip-down.d" scripts.

Thanx for your help >;0)



John Hasler wrote:

> John Leget writes:
> > Hmm no help here then im running 2.2.5-ac3, potato, and i see its up to
> > version 2.3.7-2.
>
> I installed 2.3.6 from unstable.
>
> > I dont think that alone is the problem "run-parts" ( invoked in both
> > ip-up and ip-down ) does of itself not exit until all the scripts it is
> > trying to run finish.
>
> ip-up does not exit until run-parts exits.  2.3.6 won't start ip-down until
> ip-up exits (or so the documentation says).
>
> Try adding something like this at the top of ip-down:
>
> while pidof run-parts
> do
>         sleep 1
> done
> sleep 1
>
> Or, if you don't care if the ip-up stuff gets interrupted and you can be
> sure that run-parts won't be running for any other reason,
>
> killall run-parts
>
> --
> John Hasler
> john@dhh.gt.org (John Hasler)
> Dancing Horse Hill
> Elmwood, WI
>
> --
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null


Reply to: