Date: Sun, 20 Feb 2022 11:19:28 -0600 From: Kyle Evans <kevans@freebsd.org> To: Jon Clausen <freebsd-questions@ymmv.dk> Cc: Kyle Evans <kevans@freebsd.org>, FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: jail.$jailname.conf not directly in /etc/ ? Message-ID: <CACNAnaHS9vYhuCji5_oBU9ZO8Qt0bhPs9_tBuW1VLVwuXHDE%2Bw@mail.gmail.com> In-Reply-To: <20220220111925.zv6c3cceivzkshax@c02qx0.local> References: <20220219092824.6qmzo33es3w73nj5@c02qx0.local> <CACNAnaHjtVxcjJPrjFTXdJZ3Aqwx4p%2BhurH1k3CGVRmz4MShxw@mail.gmail.com> <20220220111925.zv6c3cceivzkshax@c02qx0.local>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 20, 2022 at 5:19 AM Jon Clausen <freebsd-questions@ymmv.dk> wrote: > > On 2022-02-19 11:03:08 (-0600), Kyle Evans wrote: > > On Sat, Feb 19, 2022 at 3:29 AM Jon Clausen <freebsd-questions@ymmv.dk> wrote: > > > > Any ideas? > > > > > > > In main we've added a facility to organize jail confs a little > > differently: /etc/jail.conf.d/<jail>.conf. > > Right > > > I think, personally, if > > we're going to allow a flexible config here (which I think we should), > > we should just expand this latest form and leave the others be. > > I think I agree: Leave the old way as is, but add the new option. > > > I > > might've even brought this up in the review, because I had thought > > about it; maybe something like this: > > https://people.freebsd.org/~kevans/jail_conf_dirs.diff to search > > /etc/jail.conf.d and /usr/local/etc/jail.conf.d by default. > > > > That doesn't really solve the problem at hand, but it might be a clean > > solution for the future. > > Well, yes,and no. > > Combining the input I got from some of the other replies (and some off-list) > I came up with this "solution", which actually seems to be working > > [... snip ..,] > Hah, I like that. > So basically, by overwriting the parse_options() function with a patched > version, I can get the system to handle a jail_conf_dirs setting in rc.conf. > > Now, this is an acceptable situation for me, since this is all for my > personal little herd of jails, and it's only me messing with these systems. > But it's probably not something anyone would want to pursue in a real > production environment. > > As a proof of concept, however I'd say this does seem to work, and it's > actually pretty mush exactly what I was hoping for... so "yay!" :) > > Now I just have to remember to to watch out for updates to the system, so my > local version doesn't get in the way if /etc/rc.d/jail gets updated > upstream... :P > On the plus side, this rc script doesn't really see frequent fundamental changes. I'll go ahead and put my patch into review (+ manpage addition), because I can see the utility in having the rc script search $localbase as well. > But thanks everyone, for the responses :) > Glad we came up with a workable solution. :-) Thanks, Kyle Evans
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaHS9vYhuCji5_oBU9ZO8Qt0bhPs9_tBuW1VLVwuXHDE%2Bw>