David Marec
2020-Apr-16 09:31 UTC
What was the intention about "jail -e" in the first place ?
The manpage and usage output doesn't match. The manpage tells us that this option should be used alone on the command line, as any other command will be discarded. The usage ouput does not mention the "-r" flag but "cmr" (with a typo). Both suggest that the user can request information about one single jail, or all the jails using a wildcard or no other argument. Well, looking at the code, it sounds that the only way to make it work is to use it alone on the command line, and their is no way get information about a single jail. Attached is a short patch to get information about one single jail or all jails (wildcards or empty). But,how was "jail -e" intending to be used, actually ? -- David Marec https://lapinbilly.eu/ -------------- next part -------------- A non-text attachment was scrubbed... Name: jail.patch Type: text/x-patch Size: 2489 bytes Desc: not available URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20200416/eebf4eb2/attachment.bin>
Eugene Grosbein
2020-Apr-16 14:22 UTC
What was the intention about "jail -e" in the first place ?
16.04.2020 16:31, David Marec wrote:> The manpage and usage output doesn't match. > > The manpage tells us that this option should be used alone on the command line, as any other command will be discarded. > > The usage ouput does not mention the "-r" flag but "cmr" (with a typo). > > Both suggest that the user can request information about one single jail, or all the jails using a wildcard or no other argument. > > Well, looking at the code, it sounds that the only way to make it work is to use it alone on the command line, and their is no way get information about a single jail. > > Attached is a short patch to get information about one single jail or all jails (wildcards or empty). > > > But,how was "jail -e" intending to be used, actually ?"jail -e" mode is used by periodic/weekly/340.noid script to differentiate parts of mounted file trees belonging to the host and to the configured full-blown jails, no matter started or not. This is documentation ambiguity as "jail -e" was not intended to take jail name as additional argument. Do you have any real use case this addition?