From owner-freebsd-questions@FreeBSD.ORG Sun Jun 7 15:38:36 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDE84D18 for ; Sun, 7 Jun 2015 15:38:36 +0000 (UTC) (envelope-from che@bein.link) Received: from mail.bein.link (bein.link [37.252.124.82]) (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 941C31723 for ; Sun, 7 Jun 2015 15:38:36 +0000 (UTC) (envelope-from che@bein.link) Received: from thinkpad.localnet (home.bein.link [172.16.32.6]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bein.link (Postfix) with ESMTPSA id C70FB1AF18F; Sun, 7 Jun 2015 15:38:25 +0000 (UTC) From: Maxim V Filimonov To: freebsd-questions@freebsd.org Reply-To: che@bein.link Cc: Baho Utot Subject: Re: jails Date: Sun, 07 Jun 2015 18:38:24 +0300 Message-ID: <1642628.bHssLBXWQh@thinkpad> User-Agent: KMail/4.14.3 (FreeBSD/10.1-RELEASE-p10; KDE/4.14.3; amd64; ; ) In-Reply-To: <55744D39.9020409@columbus.rr.com> References: <55744D39.9020409@columbus.rr.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Sun, 07 Jun 2015 15:38:36 -0000 On Sunday 07 June 2015 09:55:05 Baho Utot wrote: > I have FreeBSD 10.1 and trying to setup a jail according to the handbook: > > > 15.3. Creating and Controlling Jails > > |#| *|setenv D/|/staorage/jails/crochet|/|* > |#| *|mkdir -p $D|* > |#| *|cd /usr/src|* > |#| *|make buildworld|* > |#| *|make installworld DESTDIR=$D|* > |#| *|make distribution DESTDIR=$D|* > |#| *|mount -t devfs devfs $D/dev|* > > cat /etc/jail.conf > crochet { > path = /storage/jails/crochet; > mount.devfs; > host.hostname = crochet; > ip4.addr = 192.168.1.40; > interface = re0; > exec.start = "/bin/sh /etc/rc"; > exec.stop = "/bin/sh /etc/rc.shutdown"; > } > > > jail /storage/jails/crochet crochet.bildanet.com 192.168.1.40 /bin/sh > > gives jail: Undefined variable. > > How does one manually start the jail? > > I would like to start the jail manually not automagically on boot > > I want to be "in the jail" when it starts to run crochet from there ie a > command prompt. > > OK what did I do incorrectly? > To start a jail, type > jail -c crochet To be inside this jail (i.e. to start a shell inside it), type: > jexec crochet /bin/sh -- wbr, Maxim Filimonov