Re: rc functions don't allow processes to shutdown



On Fri, 31 Aug 2007, Sean Bruno wrote:

I noticed that if rc.conf has ntpd_enable="NO", an invocation of /etc/rc.d/ntpd stop won't actually shut down ntpd. I checked a couple of other processes(like net-snmp) and noted the same behavior.

FYI, there is a list for discussing rc.d issues, freebsd-rc@. The current behavior is by design, and I don't think that changing it is a good idea this late in the game.

Assuming that lack of an affirmative _enable variable is a constant, the only way that a service can be started is with either onestart or forcestart. The symmetry here would be to stop it the same way.

I would have expected that rc would be able to invoke the stop routines if a utility is disabled,

It can invoke them, in the same way that the start routines can be invoked if a service is not enabled, by prepending one or force to stop.

Looking at this from the other direction, what would be the benefit to having plain stop act in the absence of an _enable variable for that service?

Doug

--

This .signature sanitized for your protection

_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: rc functions dont allow processes to shutdown
    ... /etc/rc.d/ntpd stop won't actually shut down ntpd. ... other processes(like net-snmp) and noted the same behavior. ... The symmetry here would be to stop it the same way. ... It can invoke them, in the same way that the start routines can be invoked ...
    (freebsd-hackers)
  • Re: rc functions dont allow processes to shutdown
    ... Sean Bruno wrote: ... /etc/rc.d/ntpd stop won't actually shut down ntpd. ... of other processes(like net-snmp) and noted the same behavior. ... allow the stop functions to be invoked regardless of the enable/disable ...
    (freebsd-hackers)
  • Re: rc functions dont allow processes to shutdown
    ... /etc/rc.d/ntpd stop won't actually shut down ntpd. ... of other processes(like net-snmp) and noted the same behavior. ... Indeed one could invoke that. ... Because of this and in order to respect POLA, ...
    (freebsd-hackers)
  • Re: rc functions dont allow processes to shutdown
    ... Tobias Roth wrote: ... /etc/rc.d/ntpd stop won't actually shut down ntpd. ... of other processes(like net-snmp) and noted the same behavior. ... Indeed one could invoke that. ...
    (freebsd-hackers)