Editing Rcorder

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 4: Line 4:
 
==Introduction==
 
==Introduction==
  
The [https://www.freebsd.org/cgi/man.cgi?query=rcorder&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html ''rcorder''] utility is designed to print out a dependency ordering of a  set of interdependent files.  Typically it is used to find an execution    sequence for a set of shell scripts in which certain files must be executed before others.
 
  
Each file passed to ''rcorder'' must be annotated with special lines (which  look like comments to the shell) which indicate the dependencies the    files have upon certain points in the sequence, known as "conditions",
 
and which indicate, for each file, which "conditions" may be expected to    be filled by that file.
 
 
==rc Script Ordering==
 
 
Each rc script identifies what resources it needs before it can start.  The [https://www.freebsd.org/cgi/man.cgi?query=rcorder&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html rcorder(8)] sorts all the scripts in '''/etc/[[Rc.d|rc.d]]''' and '''/usr/[[Local/etc/rc.d|local/etc/rc.d]]''' in to the order used at system boot. If your rc scripts have any ordering errors, those errors appear at the beginning of your [https://www.freebsd.org/cgi/man.cgi?query=rcorder&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html rcorder(8)] output.
 
 
==A Example rc Script==
 
 
 
{|class="wikitable" style="width:96.5%;background:#FFFFFF; border:2px solid #008000;text-align:left;padding: 10px"
 
|-
 
! scope="col" style="width: 100px;"|'''Lines'''
 
! scope="col" style="width: 350px;"|'''Description'''
 
|-
 
|#!/bin/sh||Indicates the interpreter /bin/sh
 
|-
 
|#||
 
|-
 
|# $FreeBSD$||
 
|-
 
|#||
 
|-
 
!colspan="2"|
 
|-
 
|# PROVIDE: timed||PROVIDE tells the [https://www.freebsd.org/cgi/man.cgi?query=rcorder&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html rcorder(8)] the name of the script: ''timed''.
 
|-
 
|# REQUIRE: DAEMON||REQUIRE says which other scripts must run any time before the script ''timed''.
 
|-
 
|# BEFORE:  LOGIN||BEFORE says: ''timed'' must run before the LOGIN script.
 
|-
 
|# KEYWORD: nojail shutdown||The KEYWORD command lets select only special sturtup scripts. The [https://www.freebsd.org/cgi/man.cgi?query=timed&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html ''timed(8)''] script ''nojail'' and ''shutdown''. Jail don't run this script. This script runs at system shutdown.
 
|-
 
!colspan="2"|
 
|-
 
|. /etc/rc.subr||The ''/etc/rc.subr'' functions used by various rc scripts
 
|-
 
!colspan="2"|
 
|-
 
|name="timed"||Set the variable name.
 
|-
 
|desc="Time server daemon"||description field, purpose of the script
 
|-
 
|rcvar="timed_enable"||lists the rc.conf variable that toggles this script
 
|-
 
|command="/usr/sbin/${name}"||The command identifies which command this script should run after all.
 
|-
 
!colspan="2"|
 
|-
 
|load_rc_config $name||load the the configuration for the service from '''/etc/[[Rc.conf|rc.conf]]'''
 
|-
 
|run_rc_command "$1"||run the command
 
|}
 
  
  
  
 
[[Category:Sysutils]]
 
[[Category:Sysutils]]

Please note that all contributions to GhostBSD Wiki are considered to be released under the Creative Commons Attribution (see GhostBSD Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)

Templates used on this page: