Solved Running jails from /etc/jail.conf.d?

I am not sure what I am missing but when I place my jail configurations into /etc/jail.conf.d the rc.d script for jails says it cannot find anything.

Is there something special I need to do to use that directory over a monolithic jail configuration file?
 
Are your configurations saved as *.conf?

Code:
        eval _jconfdir=\"/etc/jail.conf.d/${_j}.conf\"
 
is /etc/jail.conf.d/ documented anywhere?

I'm not sure whether to save info about jails there or in /etc/jail.conf
 
I don't know that it's documented separately, you just stick jail.conf-formatted files in there.

The big caveat is that you're limited to one jail per file, and the jail name has to match the file definition. In other words, service jail start foo will look in /etc/jail.conf and /etc/jail.conf.d/foo.conf for it, but no other files in /etc/jail.conf.d. It's a bummer because I'd like to modular the config by putting a few related jails in one file, which you can only do in /etc/jail.conf.
 
Are your configurations saved as *.conf?

Code:
        eval _jconfdir=\"/etc/jail.conf.d/${_j}.conf\"
Hi SirDice, I've been looking awhile now and just came across this as I was about to post on the forum.
Is this how to avoid listing lots of jails on the rc.conf file?
Because I imagine it would get very ugly when one has say 20 jails.
Or is there some way I could have them read from a list in a text file as they're started up at boot?
 
You can define:

jail_list="jail1 jail2 etc"

in your rc.conf
Yes, I've been doing that and it works fine for about 5 or so jails past which that file starts getting cluttered and gets really cumbersome.
This also works:

jail_enable=YES
jail_list=$( cat /etc/jails_list )

I'm just wondering if there's a way I could avoid using that "cat"?

Is there?
 
Back
Top