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

Re: Parallel booting enabled by default

[Kurt Roeckx]
> 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

Could be.

> As far as I know, the only daemon we currently start in rcS.d
> (that keeps running) is udev.

There are more of them.  I'm aware of portmap and some NFS related
daemons.  I believe most of of them should be moved from rcS.d/ to
rc[2-5].d/, along with networking and several others. :)

> 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.

I do not believe it is needed to add start symlinks in rc1.d/ for udev
as long as it isn't killed by killprocs.  Not sure what the current
status is there.  Both runlevel 1 and single user mode in Debian is so
broken it is hard to know where to start to make them work properly.
At the moment the only safe and sane thing to do after working in
single user mode is to reboot to recover. :(

> killprocs is probably going to kill it, so it would need to be
> restarted after that.

If killprocs kills it in rc1.d/, udev can not have a start symlink in
rc1.d/, as this will cause init.d/rc to not start udev when switching
from runlevel 1 to runlevel 2.

> I think it's going to be hard to move udev away from rcS.d, and I
> don't see the point.

I agree.

> 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.

If you keep udev out of this, I agree. :)

> 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.

I tried to explain in my previous email, that there probably is no
such case.  Either the daemon need special code to stop, and it need
to have stop symlinks in runlevels 0, 1 and 6, or it do not, and do
not need stop symlinks in any of runlevels 0, 1 and 6.

Now I believe the problem I remembered was with start symlinks in
runlevel 1, which can be problematic as the daemon will be killed by
killprocs and not start again when switching from runlevel 1 to
runlevel 2.

> 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.

I suspect you are right, that such setup do not make sense.

Happy hacking,
Petter Reinholdtsen

Reply to: