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

Re: Parallel booting enabled by default

On Mon, May 24, 2010 at 02:58:54PM +0200, Petter Reinholdtsen wrote:
> [Kurt Roeckx]
> > I don't see why you think that would be a problem.  Either the
> > init script in runlevel 1 is going to stop the service, or it
> > gets killed.  And going back to runlevel 2 should start the same
> > services as started otherwise in that runlevel.
> The reason is that I remember some bugs with packages related to
> runlevel 1, and I did not remember the details. :)
> Now I have had time to test a bit, and believe I remember the details.
> The problem is with packages starting in runlevels 1-5 and starting a
> daemon that is killed by killprocs.  Such setup is broken, as the
> daemon will not be started again when switching away from runlevel 1
> to runlevels 2-5.

I think we're discussing 2 things here, while I was only thinking
about one of them:
- Move scripts from rcS.d to rc[1-5].d
- Removing rc[016].d/K* scripts

As far as I know, the only daemon we currently start in rcS.d
(that keeps running) is udev.  udev might be something we
want to run in single user mode too, so it might make
sense to also start it in runlevel 1.  killprocs is
probably going to kill it, so it would need to be restarted
after that.  I think it's going to be hard to move
udev away from rcS.d, and I don't see the point.

It could make sense to move things from rcS.d to rc[1-5].d,
but for daemons it doesn't make sense to start in 1-5,
it should probably always be 2-5.

But my question was when it makes sense to stop a daemon in
runlevel 1 via the init script when you don't do it for
0 and 6.  killprocs is going to stop it for runlevel 1
anyway, just like sendsigs does it for runlevel 0 and 6.

I still don't get why you think something might not be
started when going from 1 to 2-5.

> For scripts that do nnot need to run when booting into single user
> mode (and thus should not start in rcS.d/), this setting would be most
> correct:
>   # Default-Start: 2 3 4 5
>   # Default-Stop:
> Runlevel 1 should be equivalent to single user, so there is no need to
> start in runlevel 1, and there is no need to stop either
> For scripts that start a daemon and need to do some cleanup when
> stopping it, this setting would be most correct
>   # Default-Start: 2 3 4 5
>   # Default-Stop:  0 1 6

Which was kind of my point.

This doesn't make sense (for a daemon):
# Default-Start: 2 3 4 5
# Default-Stop:  1

So I'm trying to think of examples where a script that doesn't stop
a daemon might be useful to run when going to runlevel 1, but not
to 0 or 6.  I guess you can probably come up with something.


Reply to: