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

Re: ppp and ip-up.d, ip-down.d



Marc.Haber-lists@gmx.de (Marc Haber) writes:

> Hi!
> 
> Recently, I did some modifications to the ppp package and e-mailed an
> inquiry about that to the package's maintainer, Phil Hands. However,
> he was unable to answer until now.
> 
> May I ask your opinion?
> 
> /etc/ppp/ip-up calls run-parts /etc/ppp/ip-up.d and /etc/ppp/ip-down
> calls run-parts /etc/ppp/ip-down.d.
> 
> I have modified that mechanism a little bit. The modification has been
> working here for four weeks. I have integrated ip-up.d and ip-down.d
> to a single ip.d that contains scripts like this:

Why not just have the scripts as is, (that is, two directories), but
also set the PPP_OPERATION variable?  That way, if you want to use the 
same script for both up and down operations you can symlink it.

Actually, just for script ordering purposes (as someone else pointed
out) I'd want to go with both an ip-up.d and an ip-down.d directory
populated by symlinks, possibly to an ip.d.  This is, I think, a
better design anyway, and also allows for a smooth transition.

> To have "best of both worlds", ip-up and ip-down could check for
> presence of ip-up.d resp ip-down.d and continue to behave the old way
> if the "old style" directories are present and only proceed running
> ip.d if the "old style" directories are not there. This could easily
> be done.

This isn't a good way to do a transition - what if one package wants
to do things "the new way", but the rest don't?  Would the package
trying to do things the new way get penalized?  (i.e. have its stuff
not run because the other packages with ip-up/ip-down scripts haven't
switched to the new style?)

I definitely think for many reasons that directories of symlinks are
the way to go.


Reply to: