Hi, Joel Rees wrote on Sat, Jan 31, 2015 at 09:17:09AM +0900: > On Fri, Jan 30, 2015 at 8:49 PM, Stuart Henderson <s...@spacehopper.org> > wrote:
>> Unfortunately you run into an inconsistency here, which occurs exactly >> because of this double-duty: "" actually means "use the default flags >> from the daemon_flags line in /etc/rc.d/somefile.rc". The description of how it works is correct, but the double-duty does not cause this quirk. For ports daemons, we have the same logic ("" -> default flags, " " -> empty flags) even though there is no double duty for ports, enabling/disabling being controlled by the pkg_scripts variable. Eliminating the double duty would not solve the problem of distinguishing "default flags" and "no flags". Keeping the double duty does not prevent solving the admittedly not very intuitive distinction of "" and " ". For example, one could redefine "" as "no flags" and use something like "DEFAULT" for "default flags" - but that would make rc.conf.local(8) very ugly ("DEFAULT" on almost every line) and error-prone (easy to forget putting "DEFAULT" there; defaults should be, well, the default, without explicitly asking for them). One could also define something like "NOFLAGS" to mean "no flags" without conflicting with the existing "NO" - but that looks like a gratuitious change with no functional advantage over " ". So i think we should just leave it as it is. > Which is half of what opendaddy is missing. > > I half-sympathize with his concerns. It _seems_ nice to have the > bundle of patch cables all connected and ready, and one switch > separate from the patch cable bundle to actually turn the box on and > patch it in. > > "Seems" being the operational word, and the issue of where one is > looking for the switch being, perhaps, the missed point? If you maintain rc.conf.local(8) by hand, you can just comment out the flags line and add flags=NO to disable a base daemon. That's your master switch to throw without ripping out all your beautiful patch cables. If you use a configuration management tool to maintain configurations across many machines, that's a job for the configuration management tool, not for rc.conf.local(8). For that reason, ajacoutot@ is adamant that rcctl(8) will always delete the flags from rc.conf.local(8) when disabling a daemon. Yours, Ingo