{
    "mode": "man",
    "parameter": "INVOKE-RC.D",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/INVOKE-RC.D/json",
    "generated": "2026-10-22T13:22:46Z",
    "synopsis": "invoke-rc.d  [--quiet]  [--force]  [--try-anyway] [--disclose-deny] [--query] [--no-fallback]\nname action [init script parameters...]\ninvoke-rc.d [--help]",
    "sections": {
        "NAME": {
            "content": "invoke-rc.d - executes System-V style init script actions\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "invoke-rc.d  [--quiet]  [--force]  [--try-anyway] [--disclose-deny] [--query] [--no-fallback]\nname action [init script parameters...]\n\ninvoke-rc.d [--help]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "invoke-rc.d is a generic interface to execute System V style init script /etc/init.d/name ac‐\ntions, obeying runlevel constraints as well as any local policies set by the system  adminis‐\ntrator.\n\nAll  access to the init scripts by Debian packages' maintainer scripts should be done through\ninvoke-rc.d.\n\nThis manpage documents only the usage and behavior of invoke-rc.d.  For a discussion  of  the\nSystem  V style init script arrangements please see init(8).  More information on invoke-rc.d\ncan be found in the section on runlevels and init.d scripts of the Debian Policy Manual.\n",
            "subsections": []
        },
        "INIT SCRIPT ACTIONS": {
            "content": "The standard actions are: start, stop, force-stop, restart,  try-restart,  reload,  force-re‐\nload,  and  status.   Other  actions are accepted, but they can cause problems to policy-rc.d\n(see the INIT SCRIPT POLICY section), so warnings are generated if the policy  layer  is  ac‐\ntive.\n\nPlease  note  that not all init scripts will implement all the actions listed above, and that\nthe policy layer may override an action to another action(s), or even deny it.\n\nAny extra parameters will be passed to the init script(s) being executed.\n\nIf an action must be carried out regardless of any local policies, use the --force switch.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "--help Display usage help.\n\n--quiet\nQuiet mode, no error messages are generated.\n\n--force\nTries to run the init script regardless of policy and init  script  subsystem  errors.\nUse of this option in Debian maintainer scripts is severely discouraged.\n\n--try-anyway\nTries to run the init script if a non-fatal error is detected.\n\n--disclose-deny\nReturn status code 101 instead of status code 0 if the init script action is denied by\nthe policy layer.\n\n--query\nReturns  one  of  the  status codes 100-106. Does not run the init script, and implies\n--disclose-deny and --no-fallback.\n\n--no-fallback\nIgnores any fallback action requests by the policy layer.  Warning: this is usually  a\nvery bad idea for any actions other than start.\n\n--skip-systemd-native\nExits  before  doing  anything  if a systemd environment is detected and the requested\nservice is a native systemd unit.  This is useful for maintainer scripts that want  to\ndefer systemd actions to deb-systemd-invoke(1p)\n",
            "subsections": []
        },
        "STATUS CODES": {
            "content": "Should an init script be executed, invoke-rc.d always returns the status code returned by the\ninit script. Init scripts should not return status codes in the 100+ range (which is reserved\nin Debian and by the LSB). The status codes returned by invoke-rc.d proper are:\n\n0      Success.  Either the init script was run and returned exit status 0 (note that a fall‐\nback action may have been run instead of the one given in the command line), or it was\nnot  run because of runlevel/local policy constrains and --disclose-deny is not in ef‐\nfect.\n\n1 - 99 Reserved for init.d script, usually indicates a failure.\n\n100    Init script ID (name) unknown.  This means the init script was not registered success‐\nfully through update-rc.d or that the init script does not exist.\n\n101    Action not allowed.  The requested action will not be performed because of runlevel or\nlocal policy constraints.\n\n102    Subsystem error.  Init script (or policy layer) subsystem  malfunction.  Also,  forced\ninit script execution due to --try-anyway or --force failed.\n\n103    Syntax error.\n\n104    Action allowed.  Init script would be run, but --query is in effect.\n\n105    Behavior  uncertain.   It cannot be determined if action should be carried out or not,\nand --query is in effect.\n\n106    Fallback action requested.  The policy layer denied the requested action, and supplied\nan allowed fallback action to be used instead.\n",
            "subsections": []
        },
        "INIT SCRIPT POLICY": {
            "content": "invoke-rc.d introduces the concept of a policy layer which is  used  to  verify  if  an  init\nscript  should  be  run  or not, or if something else should be done instead.  This layer has\nvarious uses, the most immediate ones being avoiding  that  package  upgrades  start  daemons\nout-of-runlevel, and that a package starts or stops daemons while inside a chroot jail.\n\nThe policy layer has the following abilities: deny or approve the execution of an action; re‐\nquest that another action (called a fallback) is to be taken, instead of the action requested\nin invoke-rc.d's command line; or request multiple actions to be tried in order, until one of\nthem succeeds (a multiple fallback).\n\ninvoke-rc.d itself only pays attention to the current runlevel; it will block any attempts to\nstart  a  service  in a runlevel in which the service is disabled.  Other policies are imple‐\nmented with the use of the policy-rc.d helper,  and  are  only  available  if  /usr/sbin/pol‐\nicy-rc.d is installed in the system.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/etc/init.d/*\nSystem V init scripts.\n",
            "subsections": [
                {
                    "name": "/usr/sbin/policy-rc.d",
                    "content": "Init script policy layer helper (not required).\n\n/etc/rc?.d/*\nSystem V runlevel configuration.\n"
                }
            ]
        },
        "NOTES": {
            "content": "invoke-rc.d special cases the status action, and returns exit status 4 instead of exit status\n0 when it is denied.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "See http://bugs.debian.org/sysv-rc and http://bugs.debian.org/init-system-helpers.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Debian Policy manual,\n/etc/init.d/skeleton,\nupdate-rc.d(8),\ninit(8),",
            "subsections": [
                {
                    "name": "/usr/share/doc/init-system-helpers/README.policy-rc.d.gz",
                    "content": ""
                }
            ]
        },
        "AUTHOR": {
            "content": "Henrique de Moraes Holschuh\n\nLicense: GNU General Public License v2 or Later (GPLv2+)\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "2001 Henrique de Moraes Holschuh\n\n\n1 March 2001                                                                          INVOKE-RC.D(8)",
            "subsections": []
        }
    },
    "summary": "invoke-rc.d - executes System-V style init script actions",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "update-rc.d",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/update-rc.d/8/json"
        },
        {
            "name": "init",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/init/8/json"
        }
    ]
}