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

Re: Two-part initialization?



On Sat, 03 Mar 2001 06:56:44 +0100, Marc Haber
<debian-mentors@marc-haber.de> wrote:
>My question is: How do I do this in a policy compliant way? Is there
>something more elegant than having two init.d scripts in my package?

I have been evaluating the following alternatives:

(1)
Have one init script and have this init script be invoked in two
places. The init script then checks if the network interfaces are
already up and can decide that way which step of initialization is to
be done. I rejected this because it deviates too far from the standard
way of initialization, and having the same script called twice in the
same run level can be confusing to people analyzing a system's run
levels.

(2)
Have two completely different init scripts. I rejected this because
both scripts aren't that much different and there would be much
redundancy.

(3)
Have one script symlinked to two names, and have that script decide
from $0 which part of initialization to perform. I think this is the
least ugly way to do it.

(3a)
Create the symlink in postinst and remove it in prerm. Lintian doesn't
like this (init.d script not in package, init.d script not a
conffile).

(3b)
Create the symlink in debian/rules binary. Lintian likes this, but
dpkg-buildpackage gives a warning that the init.d script is not a
plain file. Can I live with that, or is this likely to trigger bug
reports?

Any hints about this will be appreciated.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29



Reply to: