Date: Mon, 12 Jan 2009 11:13:53 GMT From: Dominic Fandrey <kamikaze@bsdforen.de> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/130414: rc services started with onestart are not stopped upon shutdown Message-ID: <200901121113.n0CBDrnB052666@www.freebsd.org> Resent-Message-ID: <200901121120.n0CBK2aM003846@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 130414 >Category: misc >Synopsis: rc services started with onestart are not stopped upon shutdown >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 12 11:20:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Dominic Fandrey >Release: RELENG_7 >Organization: private >Environment: FreeBSD mobileKamikaze.norad 7.1-STABLE FreeBSD 7.1-STABLE #1: Tue Jan 6 22:28:13 CET 2009 root@mobileKamikaze.norad:/usr/obj/HP6510b/amd64/usr/src/sys/HP6510b amd64 >Description: On development machines I often start services with onestart (e.g. /usr/local/etc/rc.d apache22 onestart). I do not set rcvar for these services, because I only require them for testing and development. The appended fix makes sure that the rc commands are executed without rcvar set if the service is running. This ensures the execution of the stop_cmd during system shutdown and makes the status and stop commands work without the one or force prefix. I have so far not stumbled over any problems caused by this. >How-To-Repeat: >Fix: --- src/etc/rc.subr.orig 2009-01-12 11:40:37.000000000 +0100 +++ src/etc/rc.subr 2009-01-12 12:00:16.000000000 +0100 @@ -603,19 +603,19 @@ fi fi + eval $_pidcmd # determine the pid + # if ${rcvar} is set, and $1 is not # "rcvar", then run # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then + if [ -z "$rc_pid" -a -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then if ! checkyesno ${rcvar}; then return 0 fi fi - eval $_pidcmd # determine the pid if necessary - for _elem in $_keywords; do if [ "$_elem" != "$rc_arg" ]; then continue >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901121113.n0CBDrnB052666>