From owner-freebsd-questions@freebsd.org Thu Oct 29 13:48:41 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 9084CA1F649 for ; Thu, 29 Oct 2015 13:48:41 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (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 64AE21232 for ; Thu, 29 Oct 2015 13:48:41 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BEFBD20212 for ; Thu, 29 Oct 2015 09:48:39 -0400 (EDT) Received: from web3 ([10.202.2.213]) by compute4.internal (MEProxy); Thu, 29 Oct 2015 09:48:39 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=PH/TvwNt0s09bzU 7taeTrB/fkes=; b=NSx+3A1M4h2Iaxw8gMBmn7Pi8/eIkk/2sNikAA8l6xr0pnY pKCGSYZY/Ka0uwGRhBTjhMdzV8zXVJHU2hv/RVePXAwdl/jwwU60kfnY8rNW5xtj 5mCJRcIGamyhTWfb4ZGNh/ZSBBn/XLLviijInEEHJN0meM3PCq1zwPwHNES0= Received: by web3.nyi.internal (Postfix, from userid 99) id 8E6BA10D51C; Thu, 29 Oct 2015 09:48:39 -0400 (EDT) Message-Id: <1446126519.3886654.423612921.572AA6CD@webmail.messagingengine.com> X-Sasl-Enc: FdDYJDZUJ8WAPaBcnQj4jBRvdZC1lSazRhiMgvikfQMN 1446126519 From: Mark Felder To: krad , galtsev@kicp.uchicago.edu Cc: FreeBSD Questions MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-55962f6b In-Reply-To: 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> Subject: Re: /etc/jail.conf documentation? Date: Thu, 29 Oct 2015 08:48:39 -0500 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: Thu, 29 Oct 2015 13:48:41 -0000 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