conf/130414: [patch] rc services started with onestart are not stopped upon shutdown

Dominic Fandrey kamikaze at bsdforen.de
Sat Apr 10 09:30:05 UTC 2010


The following reply was made to PR conf/130414; it has been noted by GNATS.

From: Dominic Fandrey <kamikaze at bsdforen.de>
To: bug-followup at FreeBSD.org, kamikaze at bsdforen.de
Cc:  
Subject: Re: conf/130414: [patch] rc services started with onestart are not
 stopped upon shutdown
Date: Sat, 10 Apr 2010 11:23:37 +0200

 Here is an improved version of the patch, that simply skips
 checkyesno ${rcvar}
 if the process is running. This way, each running service
 will be treated as if <service>_enable="YES" is set, which
 ensures proper shutdown treatment and generally more
 convenient handling or services.
 
 
 diff -u rc.subr.orig rc.subr
 --- rc.subr.orig	2010-04-10 11:09:28.000000000 +0200
 +++ rc.subr	2010-04-10 11:21:06.000000000 +0200
 @@ -660,12 +660,12 @@
  		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


More information about the freebsd-rc mailing list