Bug 223276 - rc.subr man page not clear
Summary: rc.subr man page not clear
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-doc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-27 10:39 UTC by bergerkos
Modified: 2018-08-05 05:51 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bergerkos 2017-10-27 10:39:03 UTC
I had problems reading the rc.subr man page concerning $argument_precmd.

This variable has to do with the (occasional) need to run some EXTERNAL commands when starting a daemon. It will be such commands as do NOT get inserted in any of the variables provided through rc.conf nor rc.subr.

The manual just says:
Shell commands to run just before running argument_cmd or the default method for argument.    

Now it is not immediately clear from the description that the variable has to do with ADDITIONAL commands, such as are NOT part of the rc.subr framework. 

Ah, but here one may argue: why, $argument_precmd DOES make part of rc.subr framework, does it not?

Right, but it deals with commands that go BEYOND anything configurable via rc.conf or rc.subr variables. This, in my opinion, falls into the category of EXTERNAL commands and as such deserves a more explicit mentioning in the manual. For example:
argument_precmd
ADDITIONAL shell commands to run just before running $argument_cmd or the default method for $argument, ones that cannot be placed into other rc.conf or rc.subr variables. 

I mean, without being a bit more explicit about this, the rc.subr seems to be like a close circle that includes... what it includes. And what is it? Well, it's rc.subr, don't you know.
Comment 1 bergerkos 2017-10-27 10:49:20 UTC
Maybe I was not specific enough myself, so I can add this. These are commands that cannot be supplied as command line argument or configuration option to the program itself (these are mostly ports, AFAIU). As such they have to be put explicitly somewhere. But this, one would agree, can be qualified as "extraordinary case", because this happens mostly in "unusual" or "non-standard" situations.

For example, in my case, freeradius server needs /tmp/radiusd directory to be present for it to start. And my system is configured to crear TMP on boot. Hence the need to recreate the tmpdir, but the program itself cannot do this.