*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> update-rc.d (8)              



NAME    [Toc]    [Back]

       update-rc.d - install and remove System-V style init script links

SYNOPSIS    [Toc]    [Back]

       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    [Toc]    [Back]

       update-rc.d automatically updates the System V style init script  links
       /etc/rcrunlevel.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 dpkg programmers' manual.


       When  run with either the defaults, start, or stop options, update-rc.d
       makes  links  /etc/rcrunlevel.d/[SK]NNname  pointing  to   the	script

       If  any	files  /etc/rcrunlevel.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    [Toc]    [Back]

       When  invoked  with the remove option, update-rc.d removes any links in
       the /etc/rcrunlevel.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/rcrunlevel.d directories that are not symbolic
       links to the script /etc/init.d/name will be left untouched.

OPTIONS    [Toc]    [Back]

       -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    [Toc]    [Back]

       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    [Toc]    [Back]

       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    [Toc]    [Back]

	      The directory containing the actual init scripts.

	      The directories containing the links used by init and managed by

	      Model for use by writers of init.d scripts.

SEE ALSO    [Toc]    [Back]

       dpkg programmers manual,

Debian Project			 2 March 1998			UPDATE-RC.D(8)
[ Back ]
 Similar pages
Name OS Title
invoke-rc.d Linux executes System-V style init script actions
inittab IRIX script for the init process
inittab HP-UX script for the boot init process
dh_installinit Linux install init scripts into package build directories
mkboot HP-UX install, update or remove boot programs from disk
rmboot HP-UX install, update or remove boot programs from disk
create_fastlinks HP-UX configure the system to use fast symbolic links
rc.shutdown OpenBSD command script run at system shutdown
rc0 Tru64 Runs command script executed when stopping the system
audit IRIX system audit trail startup and shutdown script
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service