I would love to see an enhancement in
jail(8) for including configuration files in
/etc/jail.conf, so that one could split one's jail configuration files somewhere under
/etc/jail.conf.d/*.conf or
/usr/local/etc/jail.conf.d/*.conf.
My company has a product that manages multiple jails but the pain point is that after changing each jail
/etc/jail.conf needs to be locked and regenerated. It would be much better to simply generate a config file per jail and then include them all in
/etc/jail.conf:
Code:
# /etc/jail.conf
some global options
# ...
include /etc/jail.conf.d/*.conf
Edit: I tried to patch "jail" to support include files but while editing the source I noticed that includes are already supported by the "jail" service.
If the respective jail names are added to
/etc/rc.conf in
jail_list
, then the files with paths
/etc/jail.conf.d/$jailname.conf can be used separately and get recognized by the jail service.
I find this great! There is only one thing I don't like: jail dependencies are not possible. It works as if every conf file is independent from the rest and dependencies cannot be implemented.
Does anyone know how can jails can be dependent on each other?
In any case, one could add the jails in the correct order to
jail_list
in
rc.conf and they will be executed in the proper order.