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

makefile-init



I hope this isn't too off-topic.

There has been some talk about a makefile-style replacement for the
sysv init mechanism. Has this been worked out in any detail?

I suppose the basic idea is to generalise run levels with
dependencies: before a service is started, all the services that it
depends on are started, and before a service is stopped, all the
services that depend on it are stopped. But:

How are dependencies from different packages combined?

Are service dependencies linked in any way to package dependencies?

Do you provide a respawn facility, or should every daemon that
provides an essential service and thinks it might crash take care of
this itself (by forking and letting the parent respawn the child)?

If you don't provide a respawn facility, do you still need a process
("init") that runs forever?

If you do provide a respawn facility, do you think the system could
also take care of remembering pids so that each daemon doesn't have to
implement its own slightly buggy variant of creating and reading
/var/run/*d.pid, with or without file locking depending on whether the
programmer can be arsed or not?

A case that can be rather awkward at present is when you want to run
several instances of a daemon. Usually it's possible, but the way to
do it is different for each program: for openssh, you create separate
config files that specify different PidFiles; for fetchmail you have
to run the program as non-root with a different value of $HOME, I
think; ...

Edmund



Reply to: