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

Re: anticipating the upstart migration

Am Sonntag 08 Oktober 2006 21:09 schrieb Gustavo Noronha Silva:
> Em Sun, 8 Oct 2006 18:56:39 +0200
> Hendrik Sattler <debian@hendrik-sattler.de> escreveu:
> > > The various commands you said could be provided as slaves to
> > > the /sbin/init alternative, which will make them be switched
> > > 'atomically'.
> >
> > But you need the shutdown command for the running init, not for the
> > chosen-for-next-boot one.
> I see... maybe upstart's shutdown could be hacked to detect it is
> running in a sysvinit booted system, and call its binary, if so.
> Something along these lines is what module-init-tools have been doing
> for sometime now, IIRC.

I propose another solution. Introduce init-common with wrappers:
* /sbin/init is a binary that
  - reads a configuration file with the init system name <iname> and
  - creates a file /var/run/inittype (or whereever is can be stored at that 
time) with the same value and
  - execs /sbin/init-<iname>
  If the configuration file is not present, run the the default init system
  or enumerate the present ones and run the first that is found.

* other binaries that ship with an init system are also wrappers that
  read /var/run/inittype and run the right binary

* the prerm script shall fail if the configuration file or the runtime
  configuration refers to it.

All this can be pretty simple and you can still manually run the different 
binaries if you know better.


Attachment: pgp01WSaZbbo3.pgp
Description: PGP signature

Reply to: