From owner-freebsd-jail@FreeBSD.ORG Sun Nov 9 05:34:04 2014 Return-Path: Delivered-To: freebsd-jail@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 320C2670 for ; Sun, 9 Nov 2014 05:34:04 +0000 (UTC) Received: from m2.gritton.org (gritton.org [63.246.134.121]) (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 F162C640 for ; Sun, 9 Nov 2014 05:34:03 +0000 (UTC) Received: from m2.gritton.org (gritton.org [63.246.134.121]) by m2.gritton.org (8.14.9/8.14.9) with ESMTP id sA95DAKl001784; Sat, 8 Nov 2014 22:13:10 -0700 (MST) (envelope-from jamie@freebsd.org) Received: (from www@localhost) by m2.gritton.org (8.14.9/8.14.9/Submit) id sA95D9a5001783; Sat, 8 Nov 2014 22:13:09 -0700 (MST) (envelope-from jamie@freebsd.org) X-Authentication-Warning: gritton.org: www set sender to jamie@freebsd.org using -f To: freebsd-jail@freebsd.org Subject: Re: fails exec.postsop after shutdown jail. X-PHP-Originating-Script: 0:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Sat, 08 Nov 2014 22:13:09 -0700 From: James Gritton In-Reply-To: References: Message-ID: <294ef242e2fd3c13fbe9c1a9aa00e559@gritton.org> X-Sender: jamie@freebsd.org User-Agent: Roundcube Webmail/1.0.3 Cc: =?UTF-8?Q?=D0=91=D0=BE=D1=80=D0=B8=D1=81?= X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2014 05:34:04 -0000 On 2014-11-07 00:47, Борис wrote: > Hi, i use FreeBSD 10.1-RC4. > When i shutdown jail (jexec /bin/sh /etc/rc.shudown) exec.poststop > doesn't work and 1st string in my jail.conf (mount = "....) doesn't > automatically unmounted, but in "man jails" say's that mount will > unmount after removing jails. > my jail.conf: > > mount = "/usr/ports /jails/$name/usr/ports nullfs ro 0 > 0 "; > exec.start = "/bin/sh /etc/rc"; > exec.stop = "/bin/sh /etc/rc.shutdown"; > mount.devfs; > exec.clean; > allow.mount; > vnet = new; > path = "/jails/$name"; > allow.raw_sockets; > > testjail1 { > exec.prestart += "ifconfig epair0 create"; > exec.prestart += "ifconfig bridge0 addm epair0a"; > exec.prestart += "ifconfig epair0a up"; > vnet.interface = "epair0b"; > exec.start += "ifconfig epair0b 192.168.1.150/24"; > exec.start += "route add default 192.168.1.254"; > exec.poststop = "ifconfig epair0a destroy"; > } > > Or am I doing something wrong? Everything looks right to me. I've tried it out on my own system, and it worked as expected. The only difference is I don't have VIMAGE, so I commented out the vnet stuff (including the exec.start that goes along with it). So maybe the trouble is with vnet? Even still, that looks correct. I'm just able to test it at the moment. Regardless, vnet shouldn't affect the nullfs mount. What output do you get for "jail -vr testjail1"? - Jamie