-.\" $OpenBSD: rc.subr.8,v 1.42 2021/12/30 08:14:29 ajacoutot Exp $
+.\" $OpenBSD: rc.subr.8,v 1.43 2022/05/21 14:11:39 ajacoutot Exp $
.\"
.\" Copyright (c) 2021 Antoine Jacoutot
.\" Copyright (c) 2011 Robert Nagy, Antoine Jacoutot, Ingo Schwarze
.\" (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: December 30 2021 $
+.Dd $Mdocdate: May 21 2022 $
.Dt RC.SUBR 8
.Os
.Sh NAME
The following shell functions are defined by
.Nm :
.Bl -tag -width rc_reload
+.It Ic rc_check
+Search for processes of the service with
+.Xr pgrep 1
+using the regular expression given in the
+.Va pexp
+variable.
.It Ic rc_cmd Ar action
Run the
.Ar action
call
.Ic rc_reload .
.El
-.It Ic rc_check
-Search for processes of the service with
-.Xr pgrep 1
-using the regular expression given in the
+.It Ic rc_exec
+Execute process using
+.Xr su 1
+according to
+.Va daemon_class ,
+.Va daemon_user ,
+.Va daemon_rtable
+and
+.Va daemon_logger
+values.
+.It Ic rc_reload
+Send the
+.Va rc_reload_signal
+using
+.Xr pkill 1
+on the regular expression given in the
.Va pexp
variable.
+One has to make sure that sending
+.Dv SIGHUP
+to a daemon will have the desired effect,
+i.e. that it will reload its configuration.
.It Ic rc_start
Start the daemon.
Defaults to:
.Bd -literal -offset indent
-${rcexec} "${daemon} ${daemon_flags}"
+rc_exec "${daemon} ${daemon_flags}"
.Ed
.It Ic rc_stop
Stop the daemon.
on the regular expression given in the
.Va pexp
variable.
-.It Ic rc_reload
-Send the
-.Va rc_reload_signal
-using
-.Xr pkill 1
-on the regular expression given in the
-.Va pexp
-variable.
-One has to make sure that sending
-.Dv SIGHUP
-to a daemon will have the desired effect,
-i.e. that it will reload its configuration.
.El
.Sh ENVIRONMENT
.Ic rc_cmd
script, if the
.Cm check
action needs root privileges.
-.It Va rcexec
-Holds the full
-.Xr su 1
-command used to run the daemon.
-Defaults to:
-.Pp
-.Dl "su -fl -c ${daemon_class} -s /bin/sh ${daemon_user} -c"
-.El
-If the routing table of the current process differs from
-.Va daemon_rtable
-the following
-.Xr route 8
-command is prepended to
-.Va rcexec :
-.Pp
-.Dl "route -T ${daemon_rtable} exec"
.Pp
All
.Va daemon_*
.Va daemon_user
will override those defaults.
.El
+.El
.Sh FILES
.Bl -tag -width Ds
.It Pa /etc/rc.d/