diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2011-02-24 07:06:36 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2011-02-24 07:06:36 +0000 |
commit | 57207e566d4544b2771030135b72de4f9d52c153 (patch) | |
tree | 15baf27f34f3694a4c65c3d101dfe6ec6621601b /share | |
parent | ba06b7a72e504dc5b0abb45973cef45917cc75c4 (diff) |
Fix several documentation bugs (including a typo fix from schwarze@).
Missing documentation about the naming policy for rc scripts.
Document rcexec.
Remove daemon_shell, it's proved useless at best and can introduce
issues we don't want to deal with.
prodded by, discussed with and ok espie@
ok robert@ miod@
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man8/rc.d.8 | 8 | ||||
-rw-r--r-- | share/man/man8/rc.subr.8 | 34 |
2 files changed, 29 insertions, 13 deletions
diff --git a/share/man/man8/rc.d.8 b/share/man/man8/rc.d.8 index 2a1f9ba8a72..7a98de010d9 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.1 2011/02/17 18:22:44 espie Exp $ +.\" $OpenBSD: rc.d.8,v 1.2 2011/02/24 07:06:35 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: February 17 2011 $ +.Dd $Mdocdate: February 24 2011 $ .Dt RC.D 8 .Os .Sh NAME @@ -72,7 +72,7 @@ by site-specific values provided in .Po variable names are obtained by replacing .Ar daemon -with the name of the actual service +with the name of the actual script .Pc : .Pp .Bl -tag -width daemon_flags -offset indent -compact @@ -88,7 +88,7 @@ as, using .El .Pp For example, postgres is managed through -.Pa /etc/rc.d/postgresqld . +.Pa /etc/rc.d/postgresql . To run the daemon using a site-specific user account, define the following in .Xr rc.conf.local 8 : .Pp diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index e35a00f67f4..288c224e7a3 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.7 2011/02/17 18:22:44 espie Exp $ +.\" $OpenBSD: rc.subr.8,v 1.8 2011/02/24 07:06:35 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: February 17 2011 $ +.Dd $Mdocdate: February 24 2011 $ .Dt RC.SUBR 8 .Os .Sh NAME @@ -37,6 +37,21 @@ .Nm rc_cmd .Ar action .Sh DESCRIPTION +.Pp +Apart from a few notable exceptions, rc scripts must follow the following +naming policy: +.Pp +.Bl -enum -compact +.It +Use the same name as the +.Nm daemon +it is referring to. +.It +.Va dashes +have to be converted to +.Va underscores . +.El +.Pp Every script under .Pa /etc/rc.d follows the following pattern: @@ -73,7 +88,7 @@ function, if needed. Call the .Ic rc_cmd function as -.Dq "rc_cmd $0" . +.Dq "rc_cmd $1" . .El .Pp The following shell functions are defined by @@ -183,11 +198,6 @@ 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 daemon will be used. -.It Va daemon_shell -Shell to run the -.Va daemon -in, using -.Xr su 1 . .It Va pexp A regular expression to be passed to .Xr pgrep 1 @@ -216,6 +226,13 @@ does not support the .Dv SIGHUP signal to reload its configuration. The same is possible, but almost never useful, for other actions. +.It Va rcexec +Holds the full +.Xr su 1 +arguments used to run +.Va daemon . +Defaults to: +.Va su -l -c ${daemon_class} -s /bin/sh ${daemon_user} -c . .El .Pp All @@ -228,7 +245,6 @@ Global defaults are provided by .Bd -literal -offset indent daemon_class=daemon daemon_flags="" -daemon_shell=/bin/sh daemon_user=root .Ed .It |