From owner-freebsd-stable@FreeBSD.ORG Thu May 24 22:20:16 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 888B2106564A for ; Thu, 24 May 2012 22:20:16 +0000 (UTC) (envelope-from mike.jakubik@intertainservices.com) Received: from mail.intertainservices.com (mail.intertainservices.com [69.77.177.114]) by mx1.freebsd.org (Postfix) with ESMTP id 5AB3C8FC0A for ; Thu, 24 May 2012 22:20:16 +0000 (UTC) Received: from [172.16.10.123] (unknown [172.16.10.123]) by mail.intertainservices.com (Postfix) with ESMTPSA id 55C465644B; Thu, 24 May 2012 18:20:15 -0400 (EDT) Message-ID: <1337898015.1908.27.camel@mike-PC> From: Mike Jakubik To: Mateusz Guzik Date: Thu, 24 May 2012 18:20:15 -0400 In-Reply-To: <20120524221353.GB17579@dft-labs.eu> References: <1337887134.1908.20.camel@mike-PC> <20120524212219.GA17579@dft-labs.eu> <1337897210.1908.24.camel@mike-PC> <20120524221353.GB17579@dft-labs.eu> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-intertainservices-MailScanner-Information: Please contact the ISP for more information X-intertainservices-MailScanner-ID: 55C465644B.ADD15 X-intertainservices-MailScanner: Found to be clean X-intertainservices-MailScanner-From: mike.jakubik@intertainservices.com X-Spam-Status: No Cc: "freebsd-stable@freebsd.org" Subject: Re: Jail startup/shutdown broken on latest 9-STABLE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2012 22:20:16 -0000 On Fri, 2012-05-25 at 00:13 +0200, Mateusz Guzik wrote: > On Thu, May 24, 2012 at 06:06:50PM -0400, Mike Jakubik wrote: > > On Thu, 2012-05-24 at 23:22 +0200, Mateusz Guzik wrote: > > > On Thu, May 24, 2012 at 03:18:54PM -0400, Mike Jakubik wrote: > > > > Hello, > > > > > > > > Latest 9-STABLE has introduced some changes that break the ezjail rc > > > > script. On bootup it fails to start, but when i log in via ssh and > > > > manually start it, it works. However i am unable to shut them down > > > > afterwards. > > > > > > > Try this: > > > http://student.agh.edu.pl/~mjguzik/patches/jail-startup-shutdown.patch > > > > > > cd /usr/src && patch -p1 < patch && cd usr.sbin/jail && make && make install > > > > > > /usr/src/etc/rc.d/jail script can be just copied over. > > > > > > Note that your /var/run/jail_* files have broken content (some line from > > > /etc/rc's output instead of jail id). > > > > > > > Mateusz, > > > > Thanks for the patch, it fixes the startup issue on boot, however > > shutting down the jails still does not work. The /var/run files have > > garbage in them as you mentioned. > > > > root@jail.local:~# cat /var/run/jail_app.id > > /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). > > > > > > Hostname is set in /etc/rc.conf. > > This message is about rc.conf from your jail. > > This should be fixed by my change to etc/rc.d/jail, are you sure that > you are running patched version? > Right, i just realized this. I set the hostname in the jailed rc.conf, now the file contains this: root@jail.local:~# cat /var/run/jail_app.id Setting hostname: app.local. I do not see a link to your jail rc.d script, just the patch.