]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r291770: rc.subr: Check for running daemons before a custom start_cmd
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 18 Dec 2015 19:58:34 +0000 (19:58 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 18 Dec 2015 19:58:34 +0000 (19:58 +0000)
commitc5925c006f365eb663b75b2bfe82c606470ed457
tree8de81ad74716023fc5a45059a12077458c30f6b1
parentec2566cca16bba9c36a171a4cf6cbceb046b05e6
MFC r291770: rc.subr: Check for running daemons before a custom start_cmd
is executed.

Currently rc scripts implementing their own start_cmd do not enjoy the
benefits of rc.subr's own check for rc_pid.

This leads to around a third of ports with such a start_cmd not to check for
the process at all and two thirds of ports to re-implement this check
(sometimes wrongly).

This patch moves the check for rc_pid to before ${rc_arg}_cmd is executed.

Submitted by: Dirk Engling
Reviewed by: feld
Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@292450 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
etc/rc.subr