Date: Thu, 21 Oct 2010 12:07:31 -0700 From: Devin Teske <dteske@vicor.com> To: Julian Elischer <julian@freebsd.org> Cc: freebsd-rc@freebsd.org Subject: Re: sysrc(8) -- a sysctl(8)-like utility for managing rc.conf(5) Message-ID: <1287688051.17360.32.camel@localhost.localdomain> In-Reply-To: <4CC05D3E.4060704@freebsd.org> References: <1286925182.32724.18.camel@localhost.localdomain> <1286996709.32724.60.camel@localhost.localdomain> <1287448781.5713.3.camel@localhost.localdomain> <1287510629.25599.2.camel@localhost.localdomain> <D763F474-8F19-4C65-B23F-78C9B137A8FE@vicor.com> <4CC05D3E.4060704@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2010-10-21 at 08:33 -0700, Julian Elischer wrote: > On 10/20/10 11:46 PM, Devin Teske wrote: > > - # c. Prefix RC_CONFS with ROOTDIR > > + # If both are supplied, `-j jail' supercedes `-R dir' > > # > I was thinking about this... -j X -R /jail/jailY is what you would > use if you were BUILDING a child jail within a jail.. > Since we now have hierarchical jails :-) > > you need not implement this.. I was just stating that I interpreted > what it would mean differently from you.. ^_^ I think we think alike. I thought long and hard about that one (actually saw some real merits to supporting either multiple `-j' arguments or combination `-j'/`-R', or multiple `-R', et cetera, etc. ad nauseum). ... but where would it end? I had to draw the line somewhere, and I figured, hey... if someone wants to build heirarchical jails, they can do this: jexec 8 sysrc -R /usr/jail/subjail1 ... or chroot /usr/jail/jail1 sysrc -R /usr/jail/subjail1 ... Where the parent jail is `/usr/jail/jail1' and the child jail is `/usr/jail/jail1/usr/jail/subjail1'. I think that seems reasonable. Even going one level deeper seems do-able (if not a bit masochistic): jexec 8 jexec 1 sysrc -R /usr/jail/subsubjail1 ... or chroot /usr/jail/jail1 chroot /usr/jail/subjail1 sysrc - R /usr/jail/subsubjail1 ... ============================== ... and it dawned on me a couple days ago ... `-R dir' is absolutely required for operating on _inactive_ jails. So this really becomes a powerful tool when you consider that nearly-all jail admins go through the following process at least once in their life: 1. Populate some directory with vanilla FreeBSD installation (either from `buildworld'/`installworld' process or via some other method such as jail_build(8) + binary distribution) 2. Configure services in rc.conf(5) file(s) within the jail prior to starting the jail. 3. Bring the jail up. I think it's notably handy to be able to have a makefile that can cleanly configure the rc.conf(5) file(s) for you within that jail prior to bringing it up. -- Cheers, Devin Teske -> CONTACT INFORMATION <- Business Solutions Consultant II FIS - fisglobal.com 510-735-5650 Mobile 510-621-2038 Office 510-621-2020 Office Fax 909-477-4578 Home/Fax devin.teske@fisglobal.com -> LEGAL DISCLAIMER <- This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. -> END TRANSMISSION <-
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1287688051.17360.32.camel>