Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

0 views
Skip to first unread message

Dominic Fandrey

unread,
Apr 10, 2010, 5:30:04 AM4/10/10
to freeb...@freebsd.org
The following reply was made to PR conf/130414; it has been noted by GNATS.

From: Dominic Fandrey <kami...@bsdforen.de>
To: bug-fo...@FreeBSD.org, kami...@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

0 new messages