POLICY-RC.D-DECLARATIVE(8) | POLICY-RC.D-DECLARATIVE(8) |
policy-rc.d-declarative - define system service policies declaratively
policy-rc.d
Debian policy states that packages providing system services need to start those services by default, and that the starting of the service should be done by way of the /usr/sbin/invoke-rc.d script. This script will execute a program /usr/sbin/policy-rc.d if it exists, allowing the local system administrator to override behaviour if wanted by creating a policy script according to the interface specified and installing it as /usr/sbin/policy-rc.d.
This interface, however, has some downsides:
As a result of this, at least one derivative distribution believed they were installing a policy script into all their installations when in fact they weren't.
Moreover, a scripted interface is far more powerful than necessary; in most cases, all that is needed is a default policy for all services, which does not require a turing-complete language.
This policy script attempts to solve these issues by allowing system administrators to provide init script policies by way of a declarative interface, rather than a scripted one. It does this by way of a directory /etc/service-policy.d in which packages and/or system administrators may place files describing the policy to be followed. For more information on how these files should be structured, please see the service-policy.d(5) man page.
The policy script interface definition states that policy scripts must support "--quiet" and "--list" arguments. This policy script does not (yet) implement those.
The list of allowed actions may be somewhat small at present. Future versions of this policy script are likely to add more, or to add a way to create custom actions. Wishlist bugs (or patches) welcome!
The policy script interface also specifies a runlevel argument to the script. This policy script does not currently use or read that argument, because it is believed to be not helpful. This may change in the future.
/usr/share/doc/init-system-helpers/README.policy-rc.d.gz, invoke-rc.d(8), service-policy.d(5)
2020-11-23 |