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

Re: [PROPOSAL] Directories for local initialization scripts



On Tue, 17 Aug 1999, Julio wrote:

> >   Add a directory /etc/init.local (or maybe /etc/init.d.local?)
> >   for locally installed init scripts, which can be handled by
> >   update-rc.d like the script in /etc/init.d.

> >Okay, with this proposal I have less problems than with the initial
> >one, but the question is: Where do we need this for?

> Let's consider the other alternatives. If a system administrator
> uses /etc/init.d for the local scripts, the following questions
> would arrive:

> 1. local files in /etc/init.d *can* be overwritten by packages
> 2. there is no direct way to identify if a script in /etc/init.d was
> installed by a package or written by the system administrator (it
> would be necessary to use dpkg --search for every file there).

Okay, these may be problem, which could worked around in two ways:
1. use special names like local.<package> for local scripts
2. use a separate directory /etc/init.local for local scripts

The 1st alternative has the advantage that you (as the admin) can
realize it without changing anything.

The 2nd alternative has the advantage that it is more generic.  It's
disadvantage is, that update-rc.d from dpkg and file-rc has to be
extended with an addition option "-l" to use /etc/init.local instead
of /etc/init.d (update-rc.d takes only the basename of the script as
parameter, while /etc/init.d is hard coded as the path in it, while rc
and rcS already access the scripts with their complete name including
path). Another disadvantage is, that you have to change the policy for 
this alternative...

> Also, it's not clear in the documentation that /etc/init.d is the
> right place for local init scripts (please correct me if I'm wrong
> here), so some administrators would be tempted to create in-house
> solutions.

AFAIK the documentation doesn't say anything about local init
scripts.  But rc and rcS are able to handle init scripts on every
place (update-rc.d doesn't, but you can create the links for local
scripts by hand or simply edit /etc/runlevel.conf, if you use
file-rc).

> 1. links to /etc/rc?.d would need to be done by hand
> 2. The choice for the directory can lead to inconsistencies with
>    other Debian systems

> Creating a specific, well defined place to hold the local init
> scripts, and where tools as update-rc.d can work as expected seems
> to be a better approach than the ones described above.

Maybe.
I propose to use /etc/init.local and extend update-rc.d with an option 
-l to use /etc/init.local instead of /etc/init.d.

That would be a way, that I could accept.

Ciao

        Roland

-- 
 * roland@spinnaker.de * http://www.spinnaker.de/ *
 PGP: 1024/DD08DD6D   2D E7 CC DE D5 8D 78 BE  3C A0 A4 F1 4B 09 CE AF


Reply to: