Hi,
If the different init systems could be installed simultaneously (with
/etc/alternatives deciding the dominant one) you wouldn't even need to
do this.  just look for the registered hint files (in
/usr/share/initsystem, by analogy with /usr/share/menu?).

Please don't forget the switching issues. alternatives is NOT
suiteable for switching init.
Because the init switch will take effect on reboot, not immediately.

Each init system should ship /etc/init-tools/methods/foobar
Which will be invoked to generate an init script for the appropriate
init system.
When installing a new init script, update-init or so (or maybe this
could be integrated with update-rc.d?) should be called in postinst.
All this is similar to update-menus

Some things to note:
- init scripts should be generated for all installed init systems
(because one might be running right now and needs appropriate shutdown
methods, and a different one might be 'scheduled' to be used after
reboot)
- auto-generation of init scripts only needs to cover 90% of cases; we
can write optimized init scripts for the remaining 10% that are
special one way or another (e.g. mysql)
- generate-init scripts should only overwrite auto-generated init
scripts; for example a package might ship a sysvinit and the meta-init
description; in that case the sysvinit generator should remain
inactive.
- switching init should be supported by using the init=foobar kernel parameter.

I posted a proposal to the list here to use /proc/1/exe for detecting
which init system is currently running (and then invoking the
appropriate /etc/init-tools/invoke/foobar etc. commands). I don't know
if anyone has investigated this closer.

best regards,
Erich Schubert
--
   erich@(mucl.de|debian.org)      --      GPG Key ID: 4B3A135C    (o_
 To understand recursion you first need to understand recursion.   //\
 Wo befreundete Wege zusammenlaufen, da sieht die ganze Welt für   V_/_
       eine Stunde wie eine Heimat aus. --- Herrmann Hesse

_______________________________________________
initscripts-ng-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/initscripts-ng-devel

Reply via email to