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

Re: [PROPOSAL] Directories for local initialization scripts



At 10:22 AM 8/17/99 +0200, you wrote:
On Mon, 16 Aug 1999, Julio wrote:

> >I don't see why there should be any discrimination of local init
> >scripts, which only can be executed in rcS.d or after all other
> >scripts. This is a restriction which isn't necessary and doesn't
> >make sense.

> I agree. However, I've mentioned this as a possible
> approach. Another approach would be to use something like rc.local

The name rc.local isn't a good choice, because that's the name of the
BSD-init directory which has a different meaning.  What you mean is a
second /etc/init.d for local scripts, don't you?

Sure.


> to hold the actual local scripts that are linked to rc?.d through
> update-rc.local, or even using a modified update-rc.d. This would
> make possible the specification of the execution order for the
> scripts.

So if I understand you right, your proposal is now reduced to the
following:

My proposal is still the same: to create a specific place to hold local initialization scripts. I have just proposed another way to implement it.

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

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.

If a system administrator creates a directory to hold the scripts using his best bet to decide where it should be created,

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.

For backup reasons and the like it doesn't make much difference
whether the local init scripts are in /etc/init.d or /etc/init.local.
And if you like to make the local scripts distinguishable, why don't
you simply name them local.foo and place them in /etc/init.d?

This is a solution, of course (although it's not very elegant).
On the other hand, my question is: Why it's a bad idea to define a dir for local init scripts?



Reply to: