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

Re: Which package provides policy-rc.d

On Sat, 22 Nov 2003, Joerg Sommer wrote:
> My idea is to ask a command, if the process should really be started. For
> me, the right point is invoke-rc.d and /etc/init.d/rc. I started to
> rewrite invoke-rc.d and found policy-rc.d. If present, it is run to find
> out, if a process should really be started - exactly why I want. But no
> package provides policy-rc.d. So why it is used in invoke-rc.d?

So that you can have your own.  pbuilder has one for inside the chroot, for

Write yours. If it is a generic useful thing for everyone, package it.  Most
policy-rc.d I've seen to date are very very simple shell scripts, so why
bother packaging them?

> I don't see why it should be possible to start a command, if invoke-rc.d
> or rc said no. So I think a veto-rc.d which prevents the starting of a
> process should be enough. I changed rc and invoke-rc.d so that run
> veto-rc.d for a command and if this returns true the command isn't
> started.

Non-generic is not good enough to become infrastructure.

policy-rc.d can do what your veto-rc.d does, and much more.

Heck, the only thing you had to do was to rename your "veto-rc.d" to
policy-rc.d, and make it exit with status 101 when you wanted to veto
something, or status 0 otherwise...  There is NO need to change ANYTHING in
the init script stuff, not in sysvinit, not in initscripts, nor in file-rc.

> I hope someone knows what policy-rc.d is and can comment my idea, because
> the maintainer of file-rc will stay conform to sysv-rc, which uses
> policy-rc.d.

http://people.debian.org/~hmh/, there is a paper there on initscripts. Read
it when people.d.o comes back online (which should be soon, if it isn't
online yet...)

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: