Re: rcctl(8) does not set flags
> > Having it documented or not, the diff below removes an unneeded step, > > since "-tun 4" is already the default for nfsd. > > I have no opinion on that one. Sure it's not necessary but maybe it makes it > more obvious as a documentation. Dunno... We can't just delete the line since it serves as context for the following paragraph. I guess we could modify all occurrences of "4" and "four" to something different, but I don't think there's anything wrong with the way it is right now. > > Index: faq6.html > > === > > RCS file: /cvs/www/faq/faq6.html,v > > retrieving revision 1.427 > > diff -u -p -r1.427 faq6.html > > --- faq6.html 9 Feb 2017 17:22:19 - 1.427 > > +++ faq6.html 15 Feb 2017 16:05:30 - > > @@ -607,7 +607,6 @@ services must be enabled on the server: > > > > > > # rcctl enable portmap mountd nfsd > > -# rcctl set nfsd flags -tun 4 > > > > > > The -t and -u flags for nfsd(8) enable TCP and UDP, > > > > -- > > db > > > > -- > Antoine >
Re: rcctl(8) does not set flags
On Wed, Feb 15, 2017 at 02:22:31PM -0200, Daniel Bolgheroni wrote: > Hi tech@, > > Setting, for example > > # rcctl enable nfsd > # rcctl set nfsd flags -tun 4 > > has no effect on /etc/rc.conf.local. This is also true for other cases > where the default flags for the daemon are equal to the flags you're > trying to set. That is correct (and expected). > It seemed a problem at first, since there is no reference to this > behaviour on the man page. But looking at the source code > (usr.sbin/rcctl/rcctl.sh, r1.105, line 452), this is actually expected. > > # unset flags if they match the default enabled ones > [ "${_args}" = "$(svc_getdef ${_svc} ${_var})" ] && \ > unset _args > > Should this behaviour be on the man page? I don't think it's too obvious > to assume the flags wasn't set on /etc/rc.conf.local because it is > already the default for the daemon. Well, if you enable sshd it won't add 'sshd=' to rc.conf.local either (since it's the default). It's kind of expected I think. That said, I don't mind to add it in the man page if people think it's worth it. But if you use rcctl to *set* flags, then use it to *get* them as well and you will see it's what you expect :-) > Having it documented or not, the diff below removes an unneeded step, > since "-tun 4" is already the default for nfsd. I have no opinion on that one. Sure it's not necessary but maybe it makes it more obvious as a documentation. Dunno... > > Index: faq6.html > === > RCS file: /cvs/www/faq/faq6.html,v > retrieving revision 1.427 > diff -u -p -r1.427 faq6.html > --- faq6.html 9 Feb 2017 17:22:19 - 1.427 > +++ faq6.html 15 Feb 2017 16:05:30 - > @@ -607,7 +607,6 @@ services must be enabled on the server: > > > # rcctl enable portmap mountd nfsd > -# rcctl set nfsd flags -tun 4 > > > The -t and -u flags for nfsd(8) enable TCP and UDP, > > -- > db > -- Antoine
rcctl(8) does not set flags
Hi tech@, Setting, for example # rcctl enable nfsd # rcctl set nfsd flags -tun 4 has no effect on /etc/rc.conf.local. This is also true for other cases where the default flags for the daemon are equal to the flags you're trying to set. It seemed a problem at first, since there is no reference to this behaviour on the man page. But looking at the source code (usr.sbin/rcctl/rcctl.sh, r1.105, line 452), this is actually expected. # unset flags if they match the default enabled ones [ "${_args}" = "$(svc_getdef ${_svc} ${_var})" ] && \ unset _args Should this behaviour be on the man page? I don't think it's too obvious to assume the flags wasn't set on /etc/rc.conf.local because it is already the default for the daemon. Having it documented or not, the diff below removes an unneeded step, since "-tun 4" is already the default for nfsd. Index: faq6.html === RCS file: /cvs/www/faq/faq6.html,v retrieving revision 1.427 diff -u -p -r1.427 faq6.html --- faq6.html 9 Feb 2017 17:22:19 - 1.427 +++ faq6.html 15 Feb 2017 16:05:30 - @@ -607,7 +607,6 @@ services must be enabled on the server: # rcctl enable portmap mountd nfsd -# rcctl set nfsd flags -tun 4 The -t and -u flags for nfsd(8) enable TCP and UDP, -- db