From d52bba9301b45a85101914647396c9a92e26aad8 Mon Sep 17 00:00:00 2001 From: Doug Barton Date: Thu, 15 Apr 2010 21:18:24 +0000 Subject: [PATCH] If a service is running, make 'stop' work even if ${name}_enable is not set. PR: conf/130414 Submitted by: Dominic Fandrey Reviewed by: freebsd-rc@ --- etc/rc.subr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/rc.subr b/etc/rc.subr index 18273be83abb..397af1d79073 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -646,12 +646,12 @@ run_rc_command() if [ "$_elem" != "$rc_arg" ]; then continue fi - # if ${rcvar} is set, and $1 is not - # "rcvar", then run + # if ${rcvar} is set, $1 is not "rcvar" + # and ${rc_pid} is not set, then run # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then return 0