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

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



On Wed 23 Sep 1998, Joseph Carter wrote:

> An example ip-up.d script:
> 
> 	/etc/ppp/ip-up.d/fetchmail
> 
> There is also:
> 
> 	/etc/ppp/ip-down.d/fetchmail
> 
> 
> I don't believe this is covered by policy, it's just provided there for
> packages to make easy use of it.  I'd like to suggest we change this
> behavior, which would require a bit of a rewrite to policy sections 3.4.1 if
> people like my suggestion, so here goes:
> 
> Why not put things in those two dirs above into /etc/init.d?  They are
> system services, just services that are start'd when ip-up is run and
> stop'd by ip-down.
> 
> 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.

> 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.

> 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?").

> 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.


Paul Slootman
-- 
home: paul@wurtel.demon.nl | work: paul@murphy.nl | debian: paul@debian.org
http://www.wurtel.demon.nl | Murphy Software,   Enschede,   the Netherlands


Reply to: