Diff for /wikisrc/guide/rc.mdwn between versions 1.4 and 1.5

version 1.4, 2013/03/21 11:11:21 version 1.5, 2015/06/19 19:18:31
Line 28  The system startup files reside in the ` Line 28  The system startup files reside in the `
  * `/etc/rc.conf.d/*`   * `/etc/rc.conf.d/*`
   
 First, a look at controlling and supporting scripts (also documented in  First, a look at controlling and supporting scripts (also documented in
 [rc(8)](http://netbsd.gw.com/cgi-bin/man-cgi?rc+8+NetBSD-5.0.1+i386)):  [[!template id=man name="rc" section="8"]]):
   
  * After the kernel has initialized all devices at startup, it starts   * After the kernel has initialized all devices at startup, it starts
    [init(8)](http://netbsd.gw.com/cgi-bin/man-cgi?init+8+NetBSD-5.0.1+i386),     [[!template id=man name="init" section="8"]],
    which in turn runs `/etc/rc`.     which in turn runs `/etc/rc`.
   
  * `/etc/rc` sorts the scripts in `/etc/rc.d` using   * `/etc/rc` sorts the scripts in `/etc/rc.d` using
    [rcorder(8)](http://netbsd.gw.com/cgi-bin/man-cgi?rcorder+8+NetBSD-5.0.1+i386)     [[!template id=man name="rcorder" section="8"]]
    and then runs them in that order. See below and the manpage for details of     and then runs them in that order. See below and the manpage for details of
    how the order of rc.d scripts is determined.     how the order of rc.d scripts is determined.
   
Line 43  First, a look at controlling and support Line 43  First, a look at controlling and support
    scripts.     scripts.
   
  * When shutting down the system with   * When shutting down the system with
    [shutdown(8)](http://netbsd.gw.com/cgi-bin/man-cgi?shutdown+8+NetBSD-5.0.1+i386),     [[!template id=man name="shutdown" section="8"]],
    `/etc/rc.shutdown` is run, which runs the scripts in `/etc/rc.d` in     `/etc/rc.shutdown` is run, which runs the scripts in `/etc/rc.d` in
    reverse order (as defined by     reverse order (as defined by
    [rcorder(8)](http://netbsd.gw.com/cgi-bin/man-cgi?rcorder+8+NetBSD-5.0.1+i386)).     [[!template id=man name="rcorder" section="8"]]).
   
    *Note*: If you shut down the system using the     *Note*: If you shut down the system using the
    [halt(8)](http://netbsd.gw.com/cgi-bin/man-cgi?halt+8+NetBSD-5.0.1+i386)     [[!template id=man name="halt" section="8"]]
    command, these scripts will not be run.     command, these scripts will not be run.
   
 There are some special scripts outside the `rc.d` directory, which are also  There are some special scripts outside the `rc.d` directory, which are also
 run:  run:
   
  * `/etc/rc.lkm` loads or unloads Loadable Kernel Modules (LKMs). See   * `/etc/rc.lkm` loads or unloads Loadable Kernel Modules (LKMs). See
    [modload(8)](http://netbsd.gw.com/cgi-bin/man-cgi?modload+8+NetBSD-5.0.1+i386)     [[!template id=man name="modload" section="8"]]
    and `/etc/rc.d/lkm[123]`.     and `/etc/rc.d/lkm[123]`.
   
  * `/etc/rc.local` is almost the last script called at boot up. This script can   * `/etc/rc.local` is almost the last script called at boot up. This script can
Line 69  change a default setting, do not edit `/ Line 69  change a default setting, do not edit `/
 the setting in `/etc/rc.conf`.  the setting in `/etc/rc.conf`.
   
 It is a good idea to read the  It is a good idea to read the
 [rc.conf(5)](http://netbsd.gw.com/cgi-bin/man-cgi?rc.conf+5+NetBSD-5.0.1+i386)  [[!template id=man name="rc.conf" section="5"]]
 man page to learn about the services that are by default available to you.  man page to learn about the services that are by default available to you.
   
 The following example shows how to enable the SSH daemon, which is disabled by  The following example shows how to enable the SSH daemon, which is disabled by
Line 79  default: Line 79  default:
     sshd=NO                 sshd_flags=""      sshd=NO                 sshd_flags=""
     # echo "sshd=YES" >> rc.conf      # echo "sshd=YES" >> rc.conf
   
 Now [sshd(8)](http://netbsd.gw.com/cgi-bin/man-cgi?sshd+8+NetBSD-5.0.1+i386)  Now [[!template id=man name="sshd" section="8"]]
 will be started automatically at system startup. The next section describes how  will be started automatically at system startup. The next section describes how
 to start and stop services at any time.  to start and stop services at any time.
   
Line 113  Some scripts may support other arguments Line 113  Some scripts may support other arguments
 support at least the above commands.  support at least the above commands.
   
 As an example, after adding a new record to a  As an example, after adding a new record to a
 [named(8)](http://netbsd.gw.com/cgi-bin/man-cgi?named+8+NetBSD-5.0.1+i386)  [[!template id=man name="named" section="8"]]
 database, the daemon can be told to reload its configuration files with the  database, the daemon can be told to reload its configuration files with the
 following command:  following command:
   
Line 132  requirement by prepending `one` to the c Line 132  requirement by prepending `one` to the c
     Starting httpd.      Starting httpd.
   
 The above command will allow you to start the  The above command will allow you to start the
 [httpd(8)](http://netbsd.gw.com/cgi-bin/man-cgi?httpd+8+NetBSD-5.0.1+i386)  [[!template id=man name="httpd" section="8"]]
 service one time. To stop a service that has been started in this manner, pass  service one time. To stop a service that has been started in this manner, pass
 `onestop` to the script.  `onestop` to the script.
   
Line 167  is the ordering information contained in Line 167  is the ordering information contained in
   
 Here we can see that this script provides the `nfsd` service and that it  Here we can see that this script provides the `nfsd` service and that it
 requires `rpcbind` and `mountd` to be running first. The  requires `rpcbind` and `mountd` to be running first. The
 [rcorder(8)](http://netbsd.gw.com/cgi-bin/man-cgi?rcorder+8+NetBSD-5.0.1+i386)  [[!template id=man name="rcorder" section="8"]]
 utility is used at system startup time to read through all the rc.d scripts and  utility is used at system startup time to read through all the rc.d scripts and
 determine the order in which they should be run.  determine the order in which they should be run.
   

Removed from v.1.4  
changed lines
  Added in v.1.5


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb