Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
update-rc.d(8)
Edit
PageHistory
Diff
Info
LikePages
!!NAME update-rc.d - install and remove System-V style init script links !!SYNOPSIS __update-rc.d__ [[ ''-n'' ] [[ ''-f'' ] ''name'' __ remove__ __update-rc.d__ [[ ''-n'' ] ''name'' __ defaults__ [[ ''NN'' | ''NN-start'' ''NN-stop'' ] __update-rc.d__ [[ ''-n'' ] ''name'' __start__ | __stop__ ''NN runlevel runlevel '' ... __.__ __start__ | __stop__ ''NN runlevel runlevel '' ... __.__ ... !!DESCRIPTION __update-rc.d__ automatically updates the System V style init script links __/etc/rc__''runlevel''__.d/__''NNname'' to scripts __/etc/init.d/__''name''. These are run by __init__ when changing runlevels and are generally used to start and stop system services such as daemons. ''runlevel'' is one of the runlevels supported by __init__, __0123456789S__, and ''NN'' is the two-digit sequence code used by __init__ to decide which order to run the scripts in. This manpage documents only the usage and behaviour of __update-rc.d__. For a discussion of the System V style init script arrangements please see init(8) and the ''Debian Policy Manual''. !!INSTALLING INIT SCRIPT LINKS When run with either the __defaults__, __start__, or __stop__ options, update-rc.d makes links __/etc/rc__''runlevel'' __.d/[[SK]__''NNname'' pointing to the script __/etc/init.d/__''name''. If any files __/etc/rc__''runlevel''__.d/[[SK]??__''name'' already exist then __update-rc.d__ does nothing. This is so that the system administrator can rearrange the links, provided that they leave at least one link remaining, without having their configuration overwritten. If __defaults__ is used then __update-rc.d__ will make links to start the service in runlevels __2345__ and stop the service in runlevels __016__. By default all the links will have sequence code 20, but this can be overridden by supplying one or two ''NN'' arguments; one argument overrides the sequence code for both start and stop links whereas of two arguments the first overrides the code for start links and the second that for stop links. Instead of __defaults__ the runlevels in which to start and stop the service may be specified explicitly using a series of sets of arguments: Each of these sets starts with an argument __start__ or __stop__ to specify whether start or stop links are to be created by that set. Then follows ''NN'', the sequence code number for all the links in the set, and one or more runlevel numbers as a single argument each. The set is terminated by an argument __.__ (a single full stop). When explicit specification, rather than __defaults__, is used there will usually be one __start__ and one __stop__ set. If different sequence codes are required in different runlevels then several __start__ sets or several __stop__ sets may be specified. The script __/etc/init.d/__''name'' must exist before __update-rc.d__ is run to create the links. !!REMOVING SCRIPTS When invoked with the ''remove'' option, update-rc.d removes any links in the __/etc/rc__''runlevel''__.d__ directories to the script __/etc/init.d/__''name.'' The script must have been deleted already - __update-rc.d__ checks for this. __update-rc.d__ is usually called from a package's post-removal script when that script detects that its first argument is __purge__ , indicating that the user has requested the configuration for the package to be removed. Any files in the __/etc/rc__''runlevel''__.d__ directories that are not symbolic links to the script __/etc/init.d/__''name'' will be left untouched. !!OPTIONS ;''-n'' : Don't do anything, just show what we would do. ;''-f'' : Force removal of symlinks even if __/etc/init.d/__''name'' still exists. !!EXAMPLES Insert links using the defaults: __update-rc.d foobar defaults__ Equivalent command using explicit argument sets: __update-rc.d foobar start 20 2 3 4 5 . stop 20 0 1 6 .__ !!BUGS There should be a way for the system administrator to specify at least the default start and stop runlevels to be used by __defaults__ and possibly to override other things as well. !!FILES ;__/etc/init.d/__ : The directory containing the actual init scripts. ;__/etc/rc?.d/__ : The directories containing the links used by __init__ and managed by __update-rc.d__ . ;__/etc/init.d/skeleton__ : Model for use by writers of __init.d__ scripts. !!SEE ALSO ''Debian Policy Manual'', __/etc/init.d/skeleton__, init(8).
2 pages link to
update-rc.d(8)
:
RedHatToDebianNotes
Man8u
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.