Date: Sat, 19 Feb 2022 23:54:18 +0100 (CET) From: Sysadmin Lists <sysadmin.lists@mailfence.com> To: freebsd-questions@freebsd.org Cc: Jon Clausen <freebsd-questions@ymmv.dk> Subject: Re: jail.$jailname.conf not directly in /etc/ ? Message-ID: <1024790408.1118263.1645311258751@ichabod.co-bxl> In-Reply-To: <20220219092824.6qmzo33es3w73nj5@c02qx0.local> References: <20220219092824.6qmzo33es3w73nj5@c02qx0.local>
next in thread | previous in thread | raw e-mail | index | archive | help
> ---------------------------------------- > From: Jon Clausen <freebsd-questions@ymmv.dk> > Sent: Sat Feb 19 10:28:24 CET 2022 > To: <freebsd-questions@freebsd.org> > Subject: jail.$jailname.conf not directly in /etc/ ? > ... > I'm trying to keep things segregated from the base system, which basicall= y > just means that I'm putting all of the datasets, config files and whateve= r > under /usr/local/ somewhere. >=20 > 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/ >=20 > 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/. >=20 > But if the files aren't in /etc/, then `service` cannot find them, and ja= il > start/stop/whatever operations fail. >=20 > 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/. >=20 > What I was hoping for would be some global setting in /etc/rc.conf, > /etc/jail.conf or somewhere... > .... Does it not work if you set up local_startup with /usr/local/rc.conf.d/jail= as a directory? From rc.conf (5):=20 In addition to /etc/rc.conf.local you can also place smaller configuration files for each rc(8) script in the /etc/rc.conf.d direct= ory or =E2=9F=A8dir=E2=9F=A9/rc.conf.d directories specified in local_star= tup, which will be included by the load_rc_config function. For jail configurations you could use the file /etc/rc.conf.d/jail to store jail specific configuration options. If local_startup contains /usr/local/etc/rc.d = and /opt/conf, /usr/local/rc.conf.d/jail and /opt/conf/rc.conf.d/jail will= be loaded. If =E2=9F=A8dir=E2=9F=A9/rc.conf.d/=E2=9F=A8name=E2=9F=A9 is = a directory, all of files in the directory will be loaded. Also see the rc_conf_files variable below. --=20 Sent with https://mailfence.com =20 Secure and private email
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1024790408.1118263.1645311258751>