Bug 261036 - [patch] rc.d/jail: Support multiple _startN and _stopN variables
Summary: [patch] rc.d/jail: Support multiple _startN and _stopN variables
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 13.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2022-01-08 16:26 UTC by Thomas Steen Rasmussen / Tykling
Modified: 2022-10-17 12:36 UTC (History)
1 user (show)

See Also:


Attachments
A patch to support having multiple jail _startN and _stopN commands (573 bytes, patch)
2022-01-08 16:26 UTC, Thomas Steen Rasmussen / Tykling
no flags Details | Diff
Support multiple jail (prepare|created|start|stop|release)N commands, and allow.mount.zfs (1.22 KB, patch)
2022-01-29 12:03 UTC, Thomas Steen Rasmussen / Tykling
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Steen Rasmussen / Tykling 2022-01-08 16:26:59 UTC
Created attachment 230822 [details]
A patch to support having multiple jail _startN and _stopN commands

Hello,

I've been running with the attached patch for /etc/rc.d/jail for a few years now. 

It enables having multiple "jail_jailname_start0" "jail_jailname_start1" "jail_jailname_start2" etc (and the same for stop) variables when using legacy variables to configure jails. This is already supported for _prestart, _poststart, _prestop, and _poststop, but for some reason _start and _stop were left out.

In case I missed something and the patch isn't as trivial as I thought then please let me know or just close this as wontfix and I will keep running with the patch locally :)

Thanks! :)

ps. I care about this because I use /etc/rc.conf.d/jail files written by ansible to configure jails. I prefer it to jail.conf because they can be written by sysrc and they are easier to maintain from configuration management compared to jail.conf(.d).
Comment 1 Thomas Steen Rasmussen / Tykling 2022-01-29 12:03:51 UTC
Created attachment 231428 [details]
Support multiple jail (prepare|created|start|stop|release)N commands, and allow.mount.zfs

This updated patch enables multiple numbered commands for all missing jail exec sections, prepare, created, start, stop and release.

While here also add support for setting allow.mount.zfs in the generated jail config.
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:36:55 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>