summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2011-04-17 22:31:36 +0000
committerdougb <dougb@FreeBSD.org>2011-04-17 22:31:36 +0000
commit91c215d2a6a56a18db8c626d8f4180a499162ce2 (patch)
tree84eafd0aad5f1bb96eb3f37f7140d80154f6e6d0 /etc
parent329bcae0e70a7c70ce98e2dd54ddb45ace4724b9 (diff)
downloadFreeBSD-src-91c215d2a6a56a18db8c626d8f4180a499162ce2.zip
FreeBSD-src-91c215d2a6a56a18db8c626d8f4180a499162ce2.tar.gz
The change in r206686 to allow the stop argument to work for a service
that is running even though not _enable'd had an annoying side effect. If the service was already started at boot time by another means when the related script came around again in rcorder it would start again, regardless of _enable, because there was a valid pid. [1] So, split the test into 2 parts, one for (!rcvar && !stop), and one for (stop && !valid_pid). This preserves the behavior from r206686 while preventing the undesired side effect. PR: conf/156427 [1] Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru> [1]
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.subr3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/rc.subr b/etc/rc.subr
index da1b198..9f3c7b6 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -651,7 +651,8 @@ run_rc_command()
# checkyesno ${rcvar}
# and return if that failed
#
- if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then
+ if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" ] ||
+ [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then
if ! checkyesno ${rcvar}; then
if [ -n "${rc_quiet}" ]; then
return 0
OpenPOWER on IntegriCloud