Init policy
There has been quite some talk about init systems on the planet, recently, but I saw noone talk about the policy stuff we have.
It annoys me that, while we have an existing policy-based system to enable or disable services, yet all rc scripts I know of that disable themselves do it through a pref in /etc/default/service_name. It also annoys me there is near to zero documentation on how you are supposed to write your policy script, and that there is no bundled policy that would help getting rid of the NO_START or whatever variables in /etc/default/*.
2007-04-14 09:32:11+0900
Both comments and pings are currently closed.
2007-04-14 10:12:44+0900
I have always thought that the policy-based system /usr/sbin/policy-rc.d was designed to easily allow the sstem administrator to override stuff and was not that useful for packaging. (Similar to dpkg-statoverride).
2007-04-14 10:28:25+0900
Andreas: Even so, what are the NO_START variables in /etc/default/* supposed to be for ?
For the record, from irc:
<nutmeg> glandium: re blog. NO_START has the bonus of beeing easily changeable by a simple sed script, triggred by a debconf question. There is no such easy way for interacting with the administrators hand grown polcy system.
<glandium> nutmeg: it would still be much better if all packages using NO_START things would not have to reinvent the wheel
<glandium> why not having a policy-rc.d thing that does both ?
2007-04-14 17:15:20+0900
I don’t get it. What policy-rc.d has to do with these (godawful) NO_START thingies? It is not (and AFAIU was never meant to be) used by /etc/init.d/rc, only by the maintainer scripts (via invoke-rc.d), so it serves a different purpose. The real configuration piece which NO_START replaces is, I believe, the symlinks in /etc/rc*d (which, as opposed to these NO_START hacks, are really system startup configuration and don’t eg. make it difficult for the admin to run /etc/init.d/foo manually, but I digress).
2007-04-15 01:24:17+0900
Hi,
Note that /etc/init.d/rc doesn’t call policy-rc.d.
So it’s not suited for disabling the startup of services.
It can however be used to disable package installations from starting or stopping services (e.g. when they are managed by a different init).