From nobody Sat Feb 19 22:54:18 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 720BB19DC828 for ; Sat, 19 Feb 2022 22:54:31 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Received: from mailout-l3b-97.contactoffice.com (mailout-l3b-97.contactoffice.com [212.3.242.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4K1P5L3KgWz4djB for ; Sat, 19 Feb 2022 22:54:30 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Received: from ichabod.co-bxl (ichabod.co-bxl [10.2.0.36]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id D961F8C8; Sat, 19 Feb 2022 23:54:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1645311261; s=20210208-e7xh; d=mailfence.com; i=sysadmin.lists@mailfence.com; h=Date:From:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc; l=2322; bh=5OsKxWd+KOH3Cqt11pcTDeyENQ2u+/1BLBdjoIyH+Fw=; b=Pgyc7sd6Xha8gR+fatwKneKOsfoUpkAlFKVUde2hGRYEsqr2XiO5m89uSCw/YVio QZwur4cVv9VJ/yE31LosjRl1GsiCfvp6wPjAxUHivdvWNqAcgvIPDx0cVOSUaV8b4ao qC/f1+LAKvnpcqdYDwgn9AAHdzCWDpvo1si7u1M3LkVDNFvI2XDcaYfLpjrojqnrPSs LeWtwIDTExXdPGRQi9mmvDEdNQRP58Vf4gbzY33KQLoF+16zKLzPdcI6MVzZy3FsuvQ eUfLi+cZhwmZzaNNlC4LnUpy4I8BC2Uppi43fN1mhSetVkfxUKLlbQ/jV9ulYsA57ZS 2xJfL367Dw== Date: Sat, 19 Feb 2022 23:54:18 +0100 (CET) From: Sysadmin Lists To: freebsd-questions@freebsd.org Message-ID: <1024790408.1118263.1645311258751@ichabod.co-bxl> In-Reply-To: <20220219092824.6qmzo33es3w73nj5@c02qx0.local> References: <20220219092824.6qmzo33es3w73nj5@c02qx0.local> Subject: Re: jail.$jailname.conf not directly in /etc/ ? List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Jon Clausen X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:312482426 X-Rspamd-Queue-Id: 4K1P5L3KgWz4djB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=mailfence.com header.s=20210208-e7xh header.b=Pgyc7sd6; dmarc=pass (policy=quarantine) header.from=mailfence.com; spf=pass (mx1.freebsd.org: domain of sysadmin.lists@mailfence.com designates 212.3.242.97 as permitted sender) smtp.mailfrom=sysadmin.lists@mailfence.com X-Spamd-Result: default: False [-2.09 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[mailfence.com:s=20210208-e7xh]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.3.242.64/26]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SUBJECT_HAS_CURRENCY(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[mailfence.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[mailfence.com,quarantine]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-questions]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:10753, ipnet:212.3.242.64/26, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_LOW(-0.10)[212.3.242.97:from] X-ThisMailContainsUnwantedMimeParts: N > ---------------------------------------- > From: Jon Clausen > Sent: Sat Feb 19 10:28:24 CET 2022 > To: > 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