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

Re: ip-{up,down}.d scripts



On Wed, Sep 23, 1998 at 10:36:37AM +0200, Paul Slootman wrote:
> > This would also require an optional parameter added to run-parts in
> > debianutils for a parameter to run with..
> 
> It would also require a rewrite of all such scripts, to take into account
> a 'start' or 'stop' parameter.

Not necessarily, let me explain why not...

ip-{up,down}.d scripts take no parameter at this time, so any new parameter
would be ignored.  I think it would be reasonable to add the init.d ability
and depreciate the older method, maintaining it for compatibility.  The new
files would be symlinks, so...


> > This line in ip-up 
> > 
> > 	run-parts /etc/ppp/ip-up.d
> > 
> > would become:
> > 
> > 	run-parts /etc/ppp/ip-updown.d start
> > 
> > and similar in ip-down with stop.  Files in ip-updown.d (better name
> > appreciated if you can think of one) would be symlinks ala the runlevel
> > stuff or something..
> 
> You still might want to separate the start and stops, like the Sxx and Kxx
> links in e.g. /etc/rc2.d .  E.g., exim has an ip-up.d script but no
> ip-down.d script. Of course, that could be handled by looking at the
> parameter.

It should be really handled by the parameter.

If not, leave /etc/ppp/ip-up.d and /etc/ppp/ip-down.d as they are and just
have things put symlinks in place of the files.  The old scripts would not
be affected as they take no parameters and these would therefore be ignored.


> > The rationale for this is that a lot of programs set these things up for ppp
> > only.  Cable modems for example--you'd still need fetchmail (their customers
> > are usually windoze users, what did you expect?) but you'd want it on system
> > startup because you'd be using it over a LAN as far as Linux is concerned. 
> > You'd want that in /etc/init.d then and you'd want to start it after
> > /etc/init.d/network sometime.
> 
> If that's your rationale, I think it would be better to either make an
> /etc/init.d script or change the existing one, and configure what it
> does during install ("Must fetchmail be started on system boot, or only
> when a PPP connection is made?").

Why?  The question could be asked yes, but changing a symlink or two is
simple and can be done easily by either postinst or sysadmin.  A similar
thread about asking whether or not to start a daemon that you might not need
comes to mind.


> > It also makes things more ... seemingly universal.
> 
> I think it would lead to confusion; it's currently clear that the stuff in
> /etc/ppp/ip-{up,down}.d is for dialup links, and the stuff in /etc/init.d
> is for stuff that gets done during runlevel (init) changes.

I tend to disagree that this would confuse, but that's why I brought it up,
for others to add their comments.

Attachment: pgpJ732tt2frs.pgp
Description: PGP signature


Reply to: