From owner-freebsd-questions@freebsd.org Fri Oct 30 08:09:48 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5188CA2019C for ; Fri, 30 Oct 2015 08:09:48 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF5C31D25; Fri, 30 Oct 2015 08:09:47 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: by wmeg8 with SMTP id g8so5722739wme.1; Fri, 30 Oct 2015 01:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wSahjJSYr9K2rAgyZCKNRDLGS8/aQu4fFvbTj+puTjE=; b=o9MnB2r0yTCgSSN/KXRrzXSaKIg99vyZzSAn/8/iLHFEPb2jAyQbXe9qIoPw0WGpAV b9q5KjQJm3sHj2psq1/D1eS+am1rQ7a+DSAIznUjHEqJxPRhEQhyVujd3ng4Y8JOKmhi KsvBXJUYubS8Z5veoLIjwIVhKbeeLs6pHFT8ybeayI/GqiZnr0TN/L0cYA99yK4nwwTn FhsxaFPPwW/0Hs8lFDZuInTJj3p99GF7kofl7/D8WvyPGkCXJuROoJqrba69ZXWS4Niz P6315kt0ZuKslBd5I/Mvw0mu3x3usoFD5/CIapr15a0/FB6eH4SJqK5rEeeGi5b7euHt aLUg== MIME-Version: 1.0 X-Received: by 10.28.145.145 with SMTP id t139mr1545671wmd.0.1446192575832; Fri, 30 Oct 2015 01:09:35 -0700 (PDT) Received: by 10.28.181.193 with HTTP; Fri, 30 Oct 2015 01:09:26 -0700 (PDT) In-Reply-To: <1446126519.3886654.423612921.572AA6CD@webmail.messagingengine.com> References: <49230.128.135.52.6.1446047977.squirrel@cosmo.uchicago.edu> <1446064085.1148620.422968569.0E47599D@webmail.messagingengine.com> <20953.128.135.52.6.1446065026.squirrel@cosmo.uchicago.edu> <1446126519.3886654.423612921.572AA6CD@webmail.messagingengine.com> Date: Fri, 30 Oct 2015 08:09:26 +0000 Message-ID: Subject: Re: /etc/jail.conf documentation? From: krad To: Mark Felder Cc: galtsev@kicp.uchicago.edu, FreeBSD Questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2015 08:09:48 -0000 You are correct, but i seem to remember having some issues at the time and this work around got me past them. I probably need to look at it again as it was a while ago. On 29 October 2015 at 13:48, Mark Felder wrote: > > > On Thu, Oct 29, 2015, at 07:17, krad wrote: > > here is an extract from one of my jail configs which shows a few other > > things to play with. Remember vnet and pf dont play at present. > > > > > > # Typical static defaults: > > # Use the rc scripts to start and stop jails. Mount jail's /dev. > > exec.start = "/bin/sh /etc/rc"; > > exec.stop = "/bin/sh /etc/rc.shutdown"; > > exec.clean; > > mount.devfs; > > > > > > # Dynamic wildcard parameter: > > # Base the path off the jail name. > > path = "/jails/$name"; > > > > > > emby { > > host.hostname = "emby.intranet"; > > vnet.interface = emby_a; > > vnet; > > exec.prestart = "ifconfig emby_a destroy || true "; > > exec.prestart += "ifconfig emby_b destroy || true"; > > exec.prestart += "ifconfig epair8 create up"; > > exec.prestart += "ifconfig epair8a name emby_a"; > > exec.prestart += "ifconfig epair8b name emby_b"; > > exec.prestart += "ifconfig emby_b up"; > > exec.prestart += "ifconfig bridge0 addm emby_b"; > > exec.prestart += "ifconfig emby_a ether 02:ff:25:fc:05:da"; > > exec.prestart += " df | grep -q /jails/emby/videos || > > mount > > -t nullfs -o rw /videos /jails/emby/videos/"; > > exec.poststop = "ifconfig emby_a destroy"; > > exec.poststop += "ifconfig emby_b destroy"; > > exec.poststop += "/sbin/umount /jails/emby/videos || true "; > > exec.start += "/sbin/dhclient emby_a"; > > exec.start += "ifconfig emby_a inet6 accept_rtadv"; > > exec.start += "/etc/rc.d/rtsold start"; > > } > > > > You don't need to handle mounting filesystems this way. Just define > > mount.fstab = /etc/fstab.$name; > > and then create /etc/fstab.emby > > Put your fstab entries in that file and it will do the right thing for > you automatically. > > > -- > Mark Felder > ports-secteam member > feld@FreeBSD.org >