Penguin
Blame: invoke-rc.d(8)
EditPageHistoryDiffInfoLikePages
Annotated edit history of invoke-rc.d(8) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 !!NAME
2 CraigBox 2 invoke-rc.d - executes System-V style init script actions
1 perry 3
4 !!SYNOPSIS
2 CraigBox 5 __invoke-rc.d__ [[ ''--quiet'' ] [[ ''--force'' ] [[ ''--try-anyway'' ] [[ ''--disclose-deny'' ] [[ ''--query'' ] [[ ''--no-fallback'' ] ''name'' ''action'' [[ ''init\'' script\ ''parameters...'' ] .HP __invoke-rc.d__ [[ ''--help'' ] .HP
1 perry 6
7 !!DESCRIPTION
2 CraigBox 8 __invoke-rc.d__ is a generic interface to execute System V style init script __/etc/init.d/__ ''name'' actions, obeying runlevel constraints as well as any local policies set by the system administrator.
1 perry 9
2 CraigBox 10 All access to the init scripts by Debian packages' maintainer scripts should be done through __invoke-rc.d.__
1 perry 11
2 CraigBox 12 This manpage documents only the usage and behavior of __invoke-rc.d__ . For a discussion of the System V style init script arrangements please see init(8) and the ''dpkg programmers' manual'' . More information on invoke-rc.d can be found in the section on runlevels and init.d scripts of the ''debian policy manual'' .
1 perry 13
14
15
16 !!INIT SCRIPT ACTIONS
2 CraigBox 17 The standard actions are: ''start'' , ''stop'' , ''force-stop'' , ''restart'' , ''reload'' , ''force-reload'' , and ''status'' . Other actions are accepted, but they can cause problems to __policy-rc.d__ (see the __INIT SCRIPT POLICY__ section), so warnings are generated if the policy layer is active.
1 perry 18
2 CraigBox 19 Please note that not all init scripts will implement all the actions listed above, and that the policy layer may override an action to another action(s), or even deny it.
1 perry 20
2 CraigBox 21 Any extra init script parameters will be passed to the init script(s) being executed.
1 perry 22
2 CraigBox 23 If an action must be carried out regardless of any local policies, use the ''--force'' switch.
1 perry 24
25
26
27 !!OPTIONS
28
2 CraigBox 29 ;''--help'' : Display usage help.
30 ;''--quiet'' : Quiet mode, no error messages are generated.
31 ;''--force'' : Tries to run the init script regardless of policy and init script subsystem errors. __Use of this option in Debian maintainer scripts is severely discouraged.__
32 ;''--try-anyway'' : Tries to run the init script if a non-fatal error is detected.
33 ;''--disclose-deny'' : Return status code 101 instead of status code 0 if the init script action is denied by the policy layer.
34 ;''--query'' : Returns one of the status codes 100-106. Does not run the init script, and implies ''--disclose-deny'' and ''--no-fallback'' .
35 ;''--no-fallback'' : Ignores any fallback action requests by the policy layer. __Warning:__ this is usually a very bad idea for any actions other than start ''.''
1 perry 36
37 !!STATUS CODES
2 CraigBox 38 Should an init script be executed, __invoke-rc.d __ always returns the status code returned by the init script. Init scripts should not return status codes in the 100+ range (which is reserved in Debian and by the LSB). The status codes returned by invoke-rc.d proper are:
39 ;''Success'' . : Either the init script was run and returned exit status 0 (note that a fallback action may have been run instead of the one given in the command line), or it was not run because of runlevel/local policy constrains and __--disclose-deny __ is not in effect.
40 ;1 - 99 : Reserved for init.d script, usually indicates a failure.
41 ;100 : __Init script ID__ __(__ ''name'' __)__ __unknown__ . This means the init script was not registered successfully through __update-rc.d__ or that the init script does not exist.
42 ;101 : __Action not allowed.__ The requested action will not be performed because of runlevel or local policy constraints.
43 ;102 : __Subsystem error.__ Init script (or policy layer) subsystem malfunction. Also, forced init script execution due to ''--try-anyway '' or ''--force'' failed.
44 ;103 : ''Syntax error.''
45 ;104 : ''Action allowed.'' Init script would be run, but __--query__ is in effect.
46 ;105 : ''Behavior uncertain.'' It cannot be determined if action should be carried out or not, and __--query__ is in effect.
47 ;106 : ''Fallback action requested.'' The policy layer denied the requested action, and supplied an allowed fallback action to be used instead.
1 perry 48
49
50
51 !!INIT SCRIPT POLICY
2 CraigBox 52 __invoke-rc.d__ introduces the concept of a policy layer which is used to verify if an init script should be run or not, or if something else should be done instead. This layer has various uses, the most immediate ones being avoiding that package upgrades start daemons out-of-runlevel, and that a package starts or stops daemons while inside a chroot jail.
1 perry 53
2 CraigBox 54 The policy layer has the following abilities: deny or approve the execution of an action; request that another action (called a ''fallback'' ) is to be taken, instead of the action requested in invoke-rc.d's command line; or request multiple actions to be tried in order, until one of them succeeds (a multiple ''fallback'' ).
1 perry 55
2 CraigBox 56 __invoke-rc.d__ itself will only pay attention to the current runlevel, and block any tries to start an init script in a runlevel it is not configured to be started at. Other policies are implemented with the use of the __policy-rc.d__ helper, and are only available if __/usr/sbin/policy-rc.d__ is installed in the system.
1 perry 57
58
59
60 !!FILES
61
2 CraigBox 62 ;__/etc/init.d/*__ : System V init scripts.
63 ;__/usr/sbin/policy-rc.d__ : Init script policy layer helper (not required).
64 ;__/etc/runlevel.conf__ : file-rc runlevel configuration (if the file-rc package is being used).
65 ;__/etc/rc?.d/*__ : System V runlevel configuration (if the file-rc package is not being used).
1 perry 66
67
68
69 !!BUGS
2 CraigBox 70 Please report any bugs using the Debian bug tracking system, http://bugs.debian.org/, packages sysv-rc or file-rc (depending on which version of invoke-rc.d you are using).
1 perry 71
72 !!SEE ALSO
2 CraigBox 73 ''dpkg programmers manual'' ,
74 __/etc/init.d/skeleton__ ,
75 __update-rc.d__ (8),
76 init(8),
77 __/usr/share/doc/sysv-rc/README.policy-rc.d__
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 15 times)