misc/156427: rcNG may start disabled service

Eugene Grosbein eugen at grosbein.pp.ru
Fri Apr 15 18:20:09 UTC 2011

>Number:         156427
>Category:       misc
>Synopsis:       rcNG may start disabled service
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 15 18:20:08 UTC 2011
>Originator:     Eugene Grosbein
>Release:        FreeBSD 8.2-STABLE i386
System: FreeBSD grosbein.pp.ru 8.2-STABLE FreeBSD 8.2-STABLE #21: Sat Apr 9 16:26:00 NOVST 2011 root at grosbein.pp.ru:/usr/local/obj/usr/local/src/sys/DADV i386


	For some services I prefer using service_enable="NO" in /etc/rc.conf
	and start them by other means when needed using "forcestart" feature.

	SVN r206686 and MFC r207797 broke this: now rc.subr at boot time
	starts disabled service if it is already started by other means
	($rc_pid is not empty).

	So, the service sometimes get started twice that's not good for me.


	1. Disable any installed service using servicename="NO" in /etc/rc.conf
	2. Run it at boot time by another script (I need service be started
	   or not depending on results of some local tests).
	3. See it's started twice.


	Mentioned change occured to make 'stop' work even if ${name}_enable
	is not set. The code should check whether it's started to 'stop'.


More information about the freebsd-bugs mailing list