> > Wait what? rcctl certainly does not check for these. > > It certainly does. I have found it now! Well, rcctl does not check for > these, but it relies on > . /etc/rc.d/rc.subr > _rc_parse_conf
Ah right yes. _rc_parse_conf() checks for this indeed. > And in /etc/rc.d/rc.subr the function _rc_parse_conf calls _rc_quirks > which checks `domainname` and /var/yp/binding and if they are set > ypbind_flags becomes ''. Yes. That is to preserve historical behavior. > So does /etc/rc, but misses; read on! > > Since I hade run 'domainname XXXX' and ypbind by hand it had set > /var/yp/binding and therefore 'rcctl enable ypbind' concludes that there is > no need for an entry in /etc/rc.conf.local because the quirked default value > is already ''. > > I am pretty certain that the reason that ypbind did not get started from > /etc/rc when /etc/defaultdomain contained a domain name and /var/yp/binding > was set is that /etc/rc sources /etc/rc.d/rc.subr and runs _rc_parse_conf > before /var is mounted so /etc/rc thinks ypbind_flags=NO. After /var has > been mounted ypbind_flags= and therefore 'rcctl ls failed' lists ypbind, > which surely enoug is not started when it should have been. > > Nasty glitch... > > I do not know how it should be fixed, but if I had enabled ypbind through > rcctl from the start I would have gotten an entry in /etc/rc.conf.local and > everything would have just worked. > > However, the quirked value for ypbind gets wrong for /etc/rc which I think > is kind of a bug... Ahahaha, that's an awesome "issue". I'll look at fixing this asap. > > > Unfortunately /etc/rc starts ypbind like any other daemon so ypbind_flags > > > has to be != NO and therefore it is not started. > > > > > > So there seems to be some misunderstanding between /etc/rc and rcctl about > > > exactly when ypbind is enabled or not. > > > > > > The workaround is easy enough (manually editing /etc/rc.conf.local so no > > > big issue. > > > > > > Also, I tried to set nfsd flags: > > > rcctl enable nfsd > > > rcctl set nfsd flags -tun 4 > > > or > > > rcctl set nfsd flags "-tun 4" > > > but it did not work (nfsd_flags=) > > > rcctl set nfsd flags -tu > > > did work, though. > > > > > > Known problems? > > > > It's not a problem, "-tun 4" are the default flags. > > Check the output of 'rcctl get nfsd flags'. > > Ok. That figures! I had read /etc/rc.conf and concluded that the default > value for nfsd_flags was NO. I mean the default flags when nfsd is enabled. > rc.subr(8) explains that rc.subr global defaults are overridden by > /etc/rc.d/ script defaults that are overrriden by /etc/rc.conf.local values. > But /etc/rc.conf defaults are not mentioned here. I feel a bit confused... > > But 'rcctl get <service>' will tell me the truth (except for ypbind_flags > in /etc/rc ;-). Thank you for enlightening me! Yes that was one of the reasons rcctl was born; so you can know the status and flags of your daemons without having to look into several files. Thanks. -- Antoine

