Re: chkconfig for Debian
Miquel van Smoorenburg wrote:
Good point, but I think we should concentrate on extending update-rc.d
to do this. Update-rc.d is the canonical interface to the startup
system in Debian; both sysvinit and file-rc come with it. You don't
have to know how the init system works, you just call update-rc.d
Assimilating chkconfig isn't a bad idea but it should just be a
frontend to update-rc.d.
I'm at the moment hacking on a rewrite of update-rc.d. I intend to make
it modular so that sysvinit and filerc can share the same code.
It will be backwards compatible, so that maintainer scripts don't need
to be changed. But I plan to define some new parameters for the new
functions because I find the way chkconfig does things more sensible.
(*duck&run*). On the other hand chkconfig is limited in what it does.
And I agree that Debian should not abopt it blindly.
I intend to extend the interface to be as powerful as possible but on
the other hand behave sensibly with default values.
Adding chkconfig compatibility would be trivial but I don't consider
this ATM.
So this would be the right time to step forward with features that would
be nice for update-rc.d.
One thing I'd really like to see is something like the default runlevel
config chkconfig stores in the init.d-scripts.
My suggestion would be something like:
# rc-default: S:- 0:K20 1:- 2:S20 3:S20 4:S20 5:S20 6:K20
# rc-local: S:- 0:K20 1:- 2:- 3:S20 4:- 5:- 6:K20
That way we can store the default-configuration and also the changes the
admin might have made.
Then we could use update-rc.d --stop service to disable the service
temporarily and update-rc.d --start service to enable it again and
update-rc.d --default service to restore the default values.
This is very preliminary of course but I'd very much appreciate comments.
Cheers,
Mika
Reply to: