Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Feb 2022 10:28:24 +0100
From:      Jon Clausen <freebsd-questions@ymmv.dk>
To:        freebsd-questions@freebsd.org
Subject:   jail.$jailname.conf not directly in /etc/ ?
Message-ID:  <20220219092824.6qmzo33es3w73nj5@c02qx0.local>

next in thread | raw e-mail | index | archive | help
Hi

I'm reworking my jails setup, transitioning from ezjail to a "manual" setup
which involves vnet and some homegrown scripts to set up zfs, nullfs
overlays, epairs, etc.

I'm trying to keep things segregated from the base system, which basically
just means that I'm putting all of the datasets, config files and whatever
under /usr/local/ somewhere.

I'm making good progress, and am generally happy with everything except
that I can't find a way to tell the "rc" system to look for the
jail.$jailname.conf files someplace other than /etc/

Basically, I think it's sort of messy and and impractical to have a bunch of
individual jail config files laying directly in /etc/. I would prefer to
have them all under, say, /usr/local/etc/jails/ or even /usr/local/etc/.

But if the files aren't in /etc/, then `service` cannot find them, and jail
start/stop/whatever operations fail.

I assume that the functionality is there, but the manpages for jail.conf,
rc.conf aren't making it obvious. And from an (admittedly superficial)
glance at /etc/rc.d/jail I don't really see how it would work with a
"global" path for the config files, other than the hardcoded /etc/.

What I was hoping for would be some global setting in /etc/rc.conf,
/etc/jail.conf or somewhere...

For this round of jails I am working on both 12.3-RELEASE and 13.0-RELEASE,
(both for the host systems and the jails) so it would be nice to find
something that works on both versions.

Am I just being dense?

I'm not having much luck finding any discussions about this anywhere
online either. But I can't believe that this topic has never come up
before, so I must assume that it's just me failing to compose my search
terms correctly...

Any ideas?

br
/jon

-- 
YMMV



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220219092824.6qmzo33es3w73nj5>