summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2016-04-26 17:43:13 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2016-04-26 17:43:13 +0000
commit76ea01bb8ba7d9bb8176053968d462217190f45a (patch)
tree6a18cdd540b171826a162687757245125e75ea2f
parent6647f66cdd1893fe2e092c6cc7e9e0cb501f11c0 (diff)
Document recent rc.subr/rc.d changes.
ok sthen@ robert@
-rw-r--r--share/man/man8/rc.d.823
-rw-r--r--share/man/man8/rc.subr.852
2 files changed, 46 insertions, 29 deletions
diff --git a/share/man/man8/rc.d.8 b/share/man/man8/rc.d.8
index eed99a7348a..7717a591e69 100644
--- a/share/man/man8/rc.d.8
+++ b/share/man/man8/rc.d.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: rc.d.8,v 1.30 2015/10/30 11:04:56 sthen Exp $
+.\" $OpenBSD: rc.d.8,v 1.31 2016/04/26 17:43:12 ajacoutot Exp $
.\"
.\" Copyright (c) 2011 Robert Nagy, Antoine Jacoutot, Ingo Schwarze
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: October 30 2015 $
+.Dd $Mdocdate: April 26 2016 $
.Dt RC.D 8
.Os
.Sh NAME
@@ -110,9 +110,9 @@ is set to
.Dq NO ,
it will prevent the daemon from starting even when listed in
.Va pkg_scripts .
-.It Ar daemon Ns _user
-User to run the daemon as, using
-.Xr su 1 .
+.It Ar daemon Ns _rtable
+Routing table to run the daemon under, using
+.Xr route 8 .
.It Ar daemon Ns _timeout
Maximum time in seconds to wait for the
.Cm start
@@ -129,6 +129,9 @@ This is only guaranteed with the default
and
.Ic rc_reload
functions.
+.It Ar daemon Ns _user
+User to run the daemon as, using
+.Xr su 1 .
.El
.Pp
To obtain the actual variable names, replace
@@ -170,11 +173,11 @@ Functions and variables used by
.Nm rc.d
scripts.
.It Pa /var/run/rc.d/
-Directory containing files recording the
-.Va pexp
-variable used by
-.Xr pkill 1
-for currently running daemons.
+Directory containing files recording the variables of currently running daemons.
+Some are informational and some are for matching daemons using
+.Xr pgrep 1
+and
+.Xr pkill 1 .
.El
.Sh SEE ALSO
.Xr rc 8 ,
diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8
index 9750588b609..4b4244c173d 100644
--- a/share/man/man8/rc.subr.8
+++ b/share/man/man8/rc.subr.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: rc.subr.8,v 1.29 2015/09/25 08:24:52 sobrado Exp $
+.\" $OpenBSD: rc.subr.8,v 1.30 2016/04/26 17:43:12 ajacoutot Exp $
.\"
.\" Copyright (c) 2011 Robert Nagy, Antoine Jacoutot, Ingo Schwarze
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: September 25 2015 $
+.Dd $Mdocdate: April 26 2016 $
.Dt RC.SUBR 8
.Os
.Sh NAME
@@ -227,11 +227,25 @@ It is an error to source
without defining
.Va daemon
first.
+.It Va daemon_class
+Login class to run the daemon with, using
+.Xr su 1 .
+This is a read only variable that gets set by
+.Nm rc.subr
+itself.
+It searches
+.Xr login.conf 5
+for a login class that has the same name as the
+.Nm rc.d
+script itself and uses that.
+If no such login class exists then
+.Dq daemon
+will be used.
.It Va daemon_flags
Arguments to call the daemon with.
-.It Va daemon_user
-User to run the daemon as, using
-.Xr su 1 .
+.It Va daemon_rtable
+Routing table to run the daemon under, using
+.Xr route 8 .
.It Va daemon_timeout
Maximum time in seconds to wait for the
.Cm start
@@ -248,20 +262,9 @@ This is only guaranteed with the default
and
.Ic rc_reload
functions.
-.It Va daemon_class
-Login class to run the daemon with, using
+.It Va daemon_user
+User to run the daemon as, using
.Xr su 1 .
-This is a read only variable that gets set by
-.Nm rc.subr
-itself.
-It searches
-.Xr login.conf 5
-for a login class that has the same name as the
-.Nm rc.d
-script itself and uses that.
-If no such login class exists then
-.Dq daemon
-will be used.
.It Va pexp
A regular expression to be passed to
.Xr pgrep 1
@@ -310,6 +313,15 @@ Defaults to:
.Pp
.Dl "su -l -c ${daemon_class} -s /bin/sh ${daemon_user} -c"
.El
+If
+.Va daemon_rtable
+is set, the following
+.Xr route 8
+command is prepended to
+.Va rcexec :
+.Pp
+.Dl "route -T ${daemon_rtable}"
+.El
.Pp
All
.Va daemon_*
@@ -320,7 +332,8 @@ Global defaults are provided by
.Nm :
.Bd -literal -offset indent
daemon_class=daemon
-daemon_flags=""
+daemon_flags=
+daemon_rtable=0
daemon_timeout=30
daemon_user=root
.Ed
@@ -339,6 +352,7 @@ site-specific values provided in
.Xr rc.conf.local 8
for
.Va daemon_flags ,
+.Va daemon_rtable ,
.Va daemon_timeout ,
and
.Va daemon_user