On Wed, 7 Mar 2001 17:01:39 -0500, Matt Zimmerman <[EMAIL PROTECTED]> wrote: >On Wed, Mar 07, 2001 at 08:39:47PM +0100, Marc Haber wrote: >> On Wed, 07 Mar 2001 13:26:35 -0500, [EMAIL PROTECTED] wrote: >> >Then have three scripts. Put the common common code into a third script >> >which is not called directly by init, but have the two init scripts call the >> >third script. This avoids redundancy and is quite clear, I think. >> >> But it is as well yucky. Where should the script with the common code be >> located? /etc/init.d as well? > >It should probably not go in /etc/init.d unless it could be called with init >file syntax on its own and do something appropriate. If it fits the general >format of setting shell variables, /etc/default may be appropriate. If not, >perhaps /etc/<package>/init.sh or some such.
Hm, how about having /etc/init.d/$package which supports the actions that are required by the sysvinit "API" and one additional target "pre-start". And then /etc/init.d/${package}-pre which invokes /etc/init.d/$package pre-start if invoked with "start", and does noop on all other actions? I find that a nice idea. Any comments? 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